tkalkirill commented on code in PR #1673:
URL: https://github.com/apache/ignite-3/pull/1673#discussion_r1109607562


##########
modules/storage-page-memory/src/main/java/org/apache/ignite/internal/storage/pagememory/mv/CommitWriteInvokeClosure.java:
##########
@@ -61,11 +68,23 @@ public void call(@Nullable VersionChain oldRow) throws 
IgniteInternalCheckedExce
             return;
         }
 
-        updateTimestampLink = oldRow.headLink();
-
         operationType = OperationType.PUT;
 
-        newRow = VersionChain.createCommitted(oldRow.rowId(), 
oldRow.headLink(), oldRow.nextLink());
+        RowVersion current = storage.readRowVersion(oldRow.headLink(), 
ALWAYS_LOAD_VALUE, false);
+        RowVersion next = oldRow.hasNextLink() ? 
storage.readRowVersion(oldRow.nextLink(), ALWAYS_LOAD_VALUE, false) : null;
+
+        // If the previous and current version are tombstones, then delete the 
current version.
+        if (next != null && current.isTombstone() && next.isTombstone()) {

Review Comment:
   I didn’t quite understand you for `next`, I don’t load data (`ByteBuffer`), 
but only read field `RowVersion#valueSize` and find out from it whether it is a 
tombstone or not.



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