[core] Notify tag callbacks when deleting all tags of one snapshot - #10234
Open
LuciferYang wants to merge 1 commit into
Open
LuciferYang wants to merge 1 commit into
LuciferYang wants to merge 1 commit into
Conversation
deleteAllTagsOfOneSnapshot deleted the tag files directly without invoking TagCallback.notifyDeletion, unlike the sibling deleteTag path used by the same expiry loop. Tag callbacks such as the Iceberg compatibility callback never learned about these deletions and kept stale metadata for tags that no longer exist. Route the batch deletion through the same delete-and-notify flow, closing the callbacks once after all tags are reported. Assisted-by: GLM-5.3
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Purpose
TagManager.deleteAllTagsOfOneSnapshotdeleted tag files directly without callingTagCallback.notifyDeletion, unlike thedeleteTagpath used by the same expiry loop inTagBatchCreation. Tag callbacks such as the Iceberg compatibility callback, the success-file callback, and the tag-to-partition callback never learned about these deletions and kept metadata for tags that no longer exist. This routes the batch deletion through a shared delete-and-notify helper and closes the callbacks once after all tags are reported, matching the single-tag delete path.This closes #10233.
Tests
Adds
TagManagerTest.testDeleteAllTagsOfOneSnapshotNotifiesCallbacks, which registers a recordingTagCallback, bulk-deletes both tags of a snapshot that still exists, and asserts both tag names are reported tonotifyDeletion. The test fails if the bulk path skips notification.API and Format
No.
Documentation
No.