Details
-
Task
-
Resolution: Unresolved
-
Major
-
None
-
None
-
None
-
Security Level: Public
-
None
Description
Moved over from other ticket:
Hi Michael,
I have tested the new version 2.9.1 (I see that the delete method with cas is there) and it still fails to delete a locked object. It works with a gets and then a delete (this works without problem) but not with a lock and then a delete. So I cannot delete a locked object with this patch. My code is very simple:
URI base = new URI("http://localhost:8091/pools");
ArrayList baseURIs = new ArrayList();
baseURIs.add(base);
client = new CouchbaseClient(baseURIs, "default", null, "");
String key = "dd2982ff68406c937040cd0c509b";
System.err.println("Creating the object");
OperationFuture<Boolean> addFuture = client.add(key, 300, "lala");
System.err.println("Status add: " + addFuture.getStatus());
System.err.println("Getting and locking the object");
OperationFuture<CASValue<Object>> future = client.asyncGetAndLock(key, 30);
System.err.println("Status getl: " + future.getStatus());
if (!future.getStatus().isSuccess())
System.err.println("Lock is mine");
System.err.println("Status getl: " + future.get());
System.err.println("delete");
OperationFuture<Boolean> future4 = client.delete(key, future.get().getCas());
System.err.println("delete: " + future4.getStatus());
if (!future4.getStatus().isSuccess())
The error is: "Temporary failure". If the getAndLock is substituted by an asyncGets it works perfectly.
Is this error something that is going to be fixed in another bug? is this one still in progress?