sergey-chugunov-1985 commented on code in PR #1235:
URL: https://github.com/apache/ignite-3/pull/1235#discussion_r1006807661


##########
modules/table/src/main/java/org/apache/ignite/internal/table/distributed/replicator/PartitionReplicaListener.java:
##########
@@ -770,16 +795,28 @@ private CompletableFuture<Object> 
processMultiEntryAction(ReadWriteMultiRowRepli
                         if (lockedRow != null) {
                             result.add(row);
                         } else {
-                            if (rowsToInsert.values().stream().noneMatch(row0 
-> row0.keySlice().equals(row.keySlice()))) {
-                                rowsToInsert.put(new RowId(partId), row);
+                            ByteBuffer keyToCheck = row.keySlice();
+                            if (!uniqueKeys.contains(keyToCheck)) {

Review Comment:
   The stream-based code performed uniqueness check. I decided to replace it 
with HashSet-based logic to avoid overcomplicated logic inside stream's lambda.



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