roc230 / spymemcached

Automatically exported from code.google.com/p/spymemcached
0 stars 0 forks source link

Lock in MemcachedClient.java #302

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Hello. Sorry for my poor English
I am using a 2.11.1 spymemcached version via java couchbase-client (1.4).
I think here 
(https://github.com/couchbase/spymemcached/blob/master/src/main/java/net/spy/mem
cached/MemcachedClient.java#L1275 - in public <T> BulkFuture<Map<String, T>> 
asyncGetBulk)     
>final CountDownLatch latch = new CountDownLatch(1) 
mistake.
If we have't any input elements latch never will be zero. 
At the 1.3 couchbase client with 2.10.4 spymemcached - ok.
I'm not sure but maybe this commit
https://github.com/couchbase/spymemcached/commit/6c6588bdb1d85e2182584ceaa052dc9
2d8b84ead

Original issue reported on code.google.com by georgij....@firstlinesoftware.com on 22 Apr 2014 at 6:17

GoogleCodeExporter commented 9 years ago
Hi,

Do you have a test case or code to reproduce? Can you explain what you mean 
with no input elements? A bulk get where no key is found?

Thanks! :)

Original comment by michael....@gmail.com on 22 Apr 2014 at 6:34

GoogleCodeExporter commented 9 years ago
I am't at work now, sorry if something wrong.
>no input elements 
When keyIter and tcIter were produced from empty collections.  
false == keyIter.hasNext() == tcIter.hasNext()
It happens when you call view query with docs including and there are no 
results from couchbase client.

Original comment by TolstovG...@gmail.com on 22 Apr 2014 at 7:42

GoogleCodeExporter commented 9 years ago
Hello again.

keyIter = {java.util.LinkedList$ListItr@5397}
lastReturned = null
next = null
nextIndex = 0
expectedModCount = 0
this$0 = {java.util.LinkedList@6360} size = 0

tcIter = {net.spy.memcached.internal.SingleElementInfiniteIterator@5398}
element = {net.spy.memcached.transcoders.SerializingTranscoder@6361}
tu = {net.spy.memcached.transcoders.TranscoderUtils@6362}
compressionThreshold = 16384
charset = {java.lang.String@6363}"UTF-8"
maxSize = 20971520
logger = null

Original comment by georgij....@firstlinesoftware.com on 23 Apr 2014 at 7:07

GoogleCodeExporter commented 9 years ago
Ah, I see what you mean.

I'll dig into the code and report what I found!

Original comment by michael....@gmail.com on 23 Apr 2014 at 7:33

GoogleCodeExporter commented 9 years ago
good catch, fix is already up here: http://review.couchbase.org/#/c/36208

will be part of 2.11.2 (and therefore couchbase sdk 1.4.1)

Original comment by michael....@gmail.com on 23 Apr 2014 at 7:47

GoogleCodeExporter commented 9 years ago
Closing it here, please see follow up in 
http://www.couchbase.com/issues/browse/SPY-163

Original comment by michael....@gmail.com on 23 Apr 2014 at 7:48

GoogleCodeExporter commented 9 years ago
>Closing it here, please see follow up
Yay, thanks for your patience!

Original comment by georgij....@firstlinesoftware.com on 23 Apr 2014 at 7:50