Comments (9)
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 [email protected]
on 20 Sep 2011 at 5:23
- Changed state: Accepted
- Added labels: Milestone-Release2.8
from spymemcached.
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 [email protected]
on 20 Sep 2011 at 5:47
from spymemcached.
Patch file attached which includes fix for the missing unlock operation.
Original comment by [email protected]
on 4 Oct 2011 at 1:51
Attachments:
from spymemcached.
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 [email protected]
on 3 Feb 2012 at 9:58
from spymemcached.
Mike I don't understand where the MembaseClient.java is now... Brent, where or
what is the ne Couchbase Client Project?
Original comment by [email protected]
on 23 Feb 2012 at 3:43
from spymemcached.
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 [email protected]
on 23 Feb 2012 at 3:58
from spymemcached.
See couchbase.com/develop/java/current for more on the couchbase java client
Original comment by [email protected]
on 23 Feb 2012 at 4:16
from spymemcached.
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 [email protected]
on 24 Feb 2012 at 3:56
from spymemcached.
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 [email protected]
on 25 Feb 2012 at 7:59
- Changed state: WontFix
from spymemcached.
Related Issues (20)
- State the dependencies in the pom file HOT 5
- Multhreaded implementation with SASL support not working. HOT 1
- Operation class is used in un-threadsafe, unsynchronized manner. HOT 4
- Inside TCPMemcachedNodeImpl, use direct buffers HOT 4
- Stability problems in async I/O HOT 4
- assertion failure during ConsistentHashingTest HOT 1
- incr/decr parameter "by" should be a long, not an int HOT 9
- Zlib encoding/binary access HOT 3
- getBulk() logs a warning when no keys are in the cache HOT 3
- bug in OperationImpl HOT 6
- get(long timeout, TimeUnit unit) may take longer than given timeout HOT 3
- IllegalArgumentException after Switching from SpyMemcached 2.7 to 2.7.1 HOT 2
- 2.7.1 jar for download corrupt? HOT 5
- Callback support HOT 11
- Get canceled HOT 5
- CAS operation fails due to client sign-extending the CAS value HOT 1
- warning for "handling node for operation is not set" if any server is down HOT 4
- javadoc warnings from tap and vbucket classes HOT 3
- CASMutator removes expiry on mutated items
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.