My goal is to make sure when one thread has created a document other threads are not able to create the same document again till the first thread has finished cleanup. I m using get and lock but its not working. The other threads are still creating the same documents before thread 1 has finished cleanup. Im using memcached buckets for storing docs.
GETL (get and lock) only works on Couchbase buckets.
@drigby So is there any way of a having a locking mechanism with memcached buckets?
There’s no pessimistic locking in the memcached protocol (which memcache buckets implement). You can use optimistic locking with CAS instead, but that will require a different design in your application.
@drigby Thanks.