ascherbakoff commented on code in PR #3713:
URL: https://github.com/apache/ignite-3/pull/3713#discussion_r1592590415


##########
modules/table/src/main/java/org/apache/ignite/internal/table/distributed/replicator/PartitionReplicaListener.java:
##########
@@ -2374,7 +2374,13 @@ private CompletableFuture<ReplicaResult> 
processMultiEntryAction(ReadWriteMultiR
 
                     rowIdFuts[i] = resolveRowByPk(pk, txId, (rowId, row, 
lastCommitTime) -> {
                         if (isDelete && rowId == null) {
-                            // Does not exist, nothing to delete.
+                            // Does not exist in storage, nothing to delete.
+                            // If there was an insert in this batch before, we 
need to skip it.
+                            Integer prevRowIdx = 
newKeyMap.remove(pk.byteBuffer());

Review Comment:
   The future can be completed on another thread, but newKeyMap is not thread 
safe.
   Same issue for insert. If this code safe ?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to