Comments (1)
Ok this seems quite fundamental so I'm assuming it's my lack of Java knowledge
and is known, if strange, behaviour, rather than a bug. But as far as I can
see, SpyMemcached uses an ObjectInputStream/OutputStream to
serialize/deserialize any java objects it is sent (I'm looking in
BaseSerializingTranscoder.java, lines 95-144).
So I tried serializing a java.util.HashMap containing a boolean value using an
ObjectInputStream, then deserialized it using an ObjectOutputStream, and got
the same problem - a new instance of java.lang.Boolean is created. Here's my
REPL session (again, apologies for the non-Java):
user=> (def bos (ByteArrayOutputStream.))
#'user/bos
user=> (def os (ObjectOutputStream. bos))
#'user/os
user=> (def hm (HashMap.))
#'user/hm
user=> (.put hm "abc" false)
nil
user=> (.get hm "abc")
false
user=> (identical? false (.get hm "abc"))
true
user=> (.writeObject os hm)
nil
user=> (def ba (.toByteArray bos))
#'user/ba
user=> ba
#<byte[] [B@737e2e57>
user=> (def bis (ByteArrayInputStream. ba))
#'user/bis
user=> (def is (ObjectInputStream. bis))
#'user/is
user=> (def newhm (.readObject is))
#'user/newhm
user=> (.get newhm "abc")
false
user=> (identical? false (.get newhm "abc"))
false
Original comment by [email protected]
on 14 Apr 2015 at 5:59
from spymemcached.
Related Issues (20)
- NPE happening in TCPMemcachedNodeImpl.fillWriteBuffer under heavy load
- Memory Leak in LinkedBlockingQueue in AsciiMemcachedNodeImpl/TCPMemcachedNodeImpl
- JVM crashed always with Memcached IO over
- NPE
- Allow to configure MAX_CLONE_COUNT parameter
- CASMutator.cas should throw typed exception
- read/write queues are not being cleared incase of faulty server:port, proposed a fix
- How to get more two values using get(key) API ?
- Broken link on "Project Home"
- Memcache sets taking unusually long time HOT 1
- Unable to read Binary data (C Struct) from Memcache HOT 7
- MemcacheClient with SerializingTranscoder isn't thread safe
- Very big performance issue with large numbers of asyncGets
- java.lang.AssertionError: Unknown line type: STORED HOT 1
- can spymemcached cause race condition?
- Missing CAS API (With exp. time and without Transcoder) HOT 1
- Client never connects with small timeout (auth problem)
- getBulk() doesn't use FailureMode HOT 3
- Set request fails after restarting the server HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from spymemcached.