Skip to content

Commit

Permalink
review comments
Browse files Browse the repository at this point in the history
  • Loading branch information
lucyge2022 committed Dec 7, 2023
1 parent 38cf63b commit 83c847b
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,8 @@ public void join(WorkerInfo workerInfo) throws IOException {
ByteSequence keyToPut = ByteSequence.from(pathOnRing, StandardCharsets.UTF_8);
ByteSequence valToPut = ByteSequence.from(serializedEntity);
CompletableFuture<TxnResponse> txnResponseFut = txn
// version of the key indicates number of modification, 0 means
// this key does not exist
.If(new Cmp(keyToPut, Cmp.Op.EQUAL, CmpTarget.version(0L)))
.Then(Op.put(keyToPut, valToPut, PutOption.newBuilder().build()))
.Else(isK8s ? Op.put(keyToPut, valToPut, PutOption.newBuilder().build()) :
Expand Down

0 comments on commit 83c847b

Please sign in to comment.