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


##########
modules/table/src/main/java/org/apache/ignite/internal/table/distributed/replicator/PartitionReplicaListener.java:
##########
@@ -2250,9 +2256,12 @@ private CompletableFuture<ReplicaResult> 
processMultiEntryAction(ReadWriteMultiR
 
                         boolean insert = rowId == null;
 
-                        RowId rowId0 = insert ? new RowId(partId(), 
UUID.randomUUID()) : rowId;
+                        RowId rowId0 = insert

Review Comment:
   Can we avoid taking locks for duplicate rows (in line 2275) ?



##########
modules/table/src/main/java/org/apache/ignite/internal/table/distributed/replicator/PartitionReplicaListener.java:
##########
@@ -2250,9 +2256,12 @@ private CompletableFuture<ReplicaResult> 
processMultiEntryAction(ReadWriteMultiR
 
                         boolean insert = rowId == null;
 
-                        RowId rowId0 = insert ? new RowId(partId(), 
UUID.randomUUID()) : rowId;
+                        RowId rowId0 = insert
+                                ? newKeyMap.computeIfAbsent(pk.byteBuffer(), 
rowIdGen)
+                                : rowId;
 
                         if (lastCommitTime != null) {
+                            assert rowId != null : "lastCommitTime is not 
null, but rowId is null";

Review Comment:
   This assert looks unrelated to bug. This is executed only for existing rows.



-- 
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