ibessonov commented on code in PR #1464:
URL: https://github.com/apache/ignite-3/pull/1464#discussion_r1055239122


##########
modules/storage-api/src/testFixtures/java/org/apache/ignite/internal/storage/impl/TestMvPartitionStorage.java:
##########
@@ -204,7 +215,18 @@ public void commitWrite(RowId rowId, HybridTimestamp 
timestamp) {
                 return versionChain;
             }
 
-            return VersionChain.forCommitted(timestamp, versionChain);
+            VersionChain committedVersionChain = 
VersionChain.forCommitted(timestamp, versionChain);
+
+            if (committedVersionChain.next != null) {
+                // Avoid creating tombstones for tombstones.
+                if (committedVersionChain.row == null && 
committedVersionChain.next.row == null) {
+                    return committedVersionChain.next;
+                }
+
+                gcQueue.add(new IgniteBiTuple<>(committedVersionChain, rowId));

Review Comment:
   You know what, gcQueue is defined with a custom comparator, right? I guess 
equality is not an issue and hashCode is never called, so writing to the queue 
several times should be fine.



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