Skip to content

Commit 4ec25d6

Browse files
committed
[skip ci] Fix based on feedback
1 parent 6c16dcd commit 4ec25d6

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

core/src/main/java/com/scalar/db/transaction/consensuscommit/CrudHandler.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,8 @@ Optional<TransactionResult> read(@Nullable Snapshot.Key key, Get get) throws Cru
154154
}
155155

156156
if (!get.getConjunctions().isEmpty()) {
157-
// Check if the result matches the conjunctions
157+
// Because we also get records whose before images match the conjunctions, we need to check if
158+
// the current status of the records actually match the conjunctions.
158159
result =
159160
result.filter(
160161
r ->
@@ -266,7 +267,8 @@ private Optional<TransactionResult> processScanResult(
266267

267268
Optional<TransactionResult> ret = Optional.of(result);
268269
if (!scan.getConjunctions().isEmpty()) {
269-
// Check if the result matches the conjunctions
270+
// Because we also get records whose before images match the conjunctions, we need to check if
271+
// the current status of the records actually match the conjunctions.
270272
ret =
271273
ret.filter(
272274
r ->

0 commit comments

Comments
 (0)