Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions src/main/java/net/spy/memcached/v2/AsyncArcusCommands.java
Original file line number Diff line number Diff line change
Expand Up @@ -1321,10 +1321,8 @@ public void receivedStatus(OperationStatus status) {
case SUCCESS:
break;
case ERR_NOT_FOUND:
result.set(null);
break;
case ERR_NOT_FOUND_ELEMENT:
result.set(new BTreeElement<>(bKey, null, null));
result.set(null);
break;
case CANCELLED:
future.internalCancel();
Expand Down
3 changes: 1 addition & 2 deletions src/main/java/net/spy/memcached/v2/AsyncArcusCommandsIF.java
Original file line number Diff line number Diff line change
Expand Up @@ -685,8 +685,7 @@ ArcusFuture<Map.Entry<Boolean, BTreeElement<T>>> bopUpsertAndGetTrimmed(
* @param bKey bKey of the element to get
* @param args arguments for get operation
* @return the {@code BTreeElement} if found,
* {@code BTreeElement} with null value and null eFlag if element is not found but key exists,
* {@code null} if key is not found
* {@code null} if the key or element is not found
*/
ArcusFuture<BTreeElement<T>> bopGet(String key, BKey bKey, BopGetArgs args);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -249,13 +249,8 @@ void bopGetWithDelete() throws Exception {
// then
.thenAccept(element -> assertEquals(ELEMENTS.get(1), element))
.thenCompose(v -> async.bopGet(key, BKey.of(2L), BopGetArgs.DEFAULT))
.thenAccept(element -> {
// ELEMENT NOT FOUND
assertNotNull(element);
assertEquals(BKey.of(2L), element.getBKey());
assertNull(element.getValue());
assertNull(element.getEFlag());
})
// ELEMENT NOT FOUND
.thenAccept(Assertions::assertNull)
.toCompletableFuture()
.get(300, TimeUnit.MILLISECONDS);
}
Expand Down Expand Up @@ -1696,10 +1691,7 @@ void bopDeleteSuccess() throws ExecutionException, InterruptedException, Timeout
assertTrue(result);
return async.bopGet(key, bKey, BopGetArgs.DEFAULT);
})
.thenAccept(result -> {
assertNotNull(result);
assertNull(result.getValue());
})
.thenAccept(Assertions::assertNull)
.toCompletableFuture()
.get(300L, TimeUnit.MILLISECONDS);
}
Expand Down
Loading