Closed GoogleCodeExporter closed 9 years ago
set shouldn't be able to unlock a key in Membase. Each lock in Membase has a
timeout and I think what you are seeing here is that lock expiring.
I will add it to the tak list for 2.8, but at the moment I can't make any
promises that I will get around to adding it. What do you plan on using it for?
Original comment by mikewie...@gmail.com
on 20 Sep 2011 at 5:23
So there are use cases where you might call "getl" to retrieve an object, but
you wind up never saving that object for whatever reason (happens pretty
often). So in order to properly use "getl", you also need to be able to use
"unl" which unlocks a key. You only use "unl" in cases where you've previously
called "getl" and failed to call "cas".
Internally at Zynga our "set" operation does what the "cas" operation does in
spymemcache (which unlocks a key that was previously locked).
I have already implemented this change as well as a few other changes so I can
use these features at Zynga. I'll try to submit a diff of this once I've
tested things out.
Original comment by brent.r...@gmail.com
on 20 Sep 2011 at 5:47
Patch file attached which includes fix for the missing unlock operation.
Original comment by brent.r...@gmail.com
on 4 Oct 2011 at 1:51
Attachments:
Brent,
We just added unl to Spymemcached. Thanks for submitting this patch, there was
a little but of code missing but we filled in the blanks. I just wanted to let
you know that unl will not appear in MemcachedClient since standard memcached
doesn't technically support unl. We did add them in CouchbaseClient however
which is a part of the ne Couchbase Client project. I know this won't work for
your specific use case so what you will probably have to do is extend
MemcachedClient and add in the function definitions. Let me know if you have
any trouble doing this and thanks again for contributing the code.
Original comment by mikewie...@gmail.com
on 3 Feb 2012 at 9:58
Mike I don't understand where the MembaseClient.java is now... Brent, where or
what is the ne Couchbase Client Project?
Original comment by rickyepo...@gmail.com
on 23 Feb 2012 at 3:43
We decided that Spymemcached should be just for memcached and that we should
have a separate project for people who want to use Membase/Couchbase. As a
result we created the Couchbase Client project which is based on Spymemcached.
At a high level we just moved all of the code for Membase/Couchbase out of
Spymemcached and eliminated the MembaseClient class. If you were using
MembaseClient you should now be using Couchbase Client.
Also, he unl changes are part of Spymemcached, but we have not released an
official version with the changes yet.
Original comment by mikewie...@gmail.com
on 23 Feb 2012 at 3:58
See couchbase.com/develop/java/current for more on the couchbase java client
Original comment by ingen...@gmail.com
on 23 Feb 2012 at 4:16
I wanted to find the source code. But finally I found it here:
http://review.couchbase.org/gitweb?p=couchbase-java-client.git;a=tree
There the getAndLock and unlock methods are implemented.
Thank you very much!
Original comment by rickyepo...@gmail.com
on 24 Feb 2012 at 3:56
The authoritative place for the source is:
https://github.com/couchbase/couchbase-java-client
An update should be released soon with unlock support.
Closing this, as it's tracked in a different project.
Original comment by ingen...@gmail.com
on 25 Feb 2012 at 7:59
Original issue reported on code.google.com by
brent.r...@gmail.com
on 19 Sep 2011 at 7:11