You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@ignite.apache.org by "ascherbakoff (via GitHub)" <gi...@apache.org> on 2024/03/20 14:11:28 UTC
Re: [PR] IGNITE-21521 Fix update order in upsertAll and DataStreamer for a new key [ignite-3]
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: notifications-unsubscribe@ignite.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org