tkalkirill commented on code in PR #1673:
URL: https://github.com/apache/ignite-3/pull/1673#discussion_r1109604616
##########
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()) {
+ toRemove = current;
+
+ newRow = VersionChain.createCommitted(oldRow.rowId(), next.link(),
next.nextLink());
Review Comment:
No, because we are updating links from `next` and not from the `current`.
Perhaps you will have a question about the code below on line 84, then we
must execute `PUT` in order for `CommitWriteInvokeClosure#onUpdate` to be
called.
--
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]