Open GoogleCodeExporter opened 9 years ago
Thanks for reporting this, I'll take a look soon.
Do you have any code that reliably reproduces this?
Original comment by michael....@gmail.com
on 20 Mar 2014 at 9:53
I can't share the exact code as it's proprietary but here's something that's
close enough:
The client is created like this:
client = new net.spy.memcached.MemcachedClient(new KetamaConnectionFactory(), hosts)
and the host is a list of three machines, where one of them is on localhost.
final OperationFuture<Boolean> future = this.client.set(key, ttlSec, value, transcoder);
future.addListener( // Here is where it deadlocks
new OperationCompletionListener() {
@Override
public void onComplete(final OperationFuture<?> ignored) throws Exception {
// do stuff
}
});
Our usage pattern is mostly gets and occasional puts.
Original comment by k...@spotify.com
on 20 Mar 2014 at 9:58
I forgot to mention that we were previously running 2.10.0 without any issues,
so the bug was probably introduced between 2.10.1 and 2.10.6.
I looked a bit at the recent changes and maybe this change introduced this bug?
http://www.couchbase.com/issues/browse/SPY-155
I have no strong argument for that, other then that it introduces a lock and
correlates somewhat in time.
Original comment by k...@spotify.com
on 20 Mar 2014 at 10:03
hmm that could very well be.. thanks for the pointer, I'll figure it out I
hope..
btw the sync was added because we had reports that the listener was sometimes
never called
Original comment by michael....@gmail.com
on 20 Mar 2014 at 10:13
looks like someone else hit the same issue, currently investigating again.
Hope to have a fix for 2.11.2.
Original comment by michael....@gmail.com
on 23 Apr 2014 at 2:56
[deleted comment]
Same here on 2.10.6
Original comment by tovbinm@gmail.com
on 29 Apr 2014 at 12:24
Attachments:
Here my code snippet in Scala, but should readable:
val promise: Promise[T] = ...
val future = memcached.asyncGet(...)
future.addListener(new GetCompletionListener {
def onComplete(future: GetFuture[_]) = promise.complete( Try { future.get().asInstanceOf[T] } )
})
Original comment by tovbinm@gmail.com
on 29 Apr 2014 at 3:01
Thanks, we already have a fix pending for the next bugfix release! Should go
out this or next week.
Cheers
Michael
Original comment by michael....@gmail.com
on 5 May 2014 at 6:16
Any status updates? Is it fixed in 2.11.4?
Original comment by k...@spotify.com
on 24 Sep 2014 at 9:45
Original issue reported on code.google.com by
k...@spotify.com
on 20 Mar 2014 at 9:49