ibessonov commented on code in PR #1464:
URL: https://github.com/apache/ignite-3/pull/1464#discussion_r1056114999
##########
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:
> We now have 2 identical entries in the GC queue.
There can be no duplicates in the queue. Anyway, I think I found a different
example where the map itself can break regardless of the queue.
> Why don't we just add synchronization to make sure it behaves as
predictable as possible?
I think I will
--
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]