squah-confluent commented on code in PR #24146:
URL: https://github.com/apache/kafka/pull/24146#discussion_r4516935905


##########
server-common/src/main/java/org/apache/kafka/timeline/SnapshottableHashTable.java:
##########
@@ -429,6 +430,9 @@ public void executeRevert(long targetEpoch, Delta delta) {
                 }
                 out.clear();
             }
+            // The elements of the tier are back in the current state. Drop 
them from the tier
+            // so that iterating over the snapshot does not return them twice.
+            tier.deltaTable = null;

Review Comment:
   I would prefer if we fix this at the level of the snapshot system.
   
   The `Delta`s contain instructions for reverting to the start of the epoch. 
They should only be used once. It's a bug that the snapshotting system leaves 
used `Delta`s in place after a revert. The other `Timeline` containers are only 
unaffected because they happen to have idempotent `Delta`s.



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