Skip to content

[core] Notify tag callbacks when deleting all tags of one snapshot - #10234

Open
LuciferYang wants to merge 1 commit into
apache:masterfrom
LuciferYang:m/core-057-tag-callback
Open

LuciferYang wants to merge 1 commit into
apache:masterfrom
LuciferYang:m/core-057-tag-callback

Conversation

@LuciferYang

Copy link
Copy Markdown
Contributor

Purpose

TagManager.deleteAllTagsOfOneSnapshot deleted tag files directly without calling TagCallback.notifyDeletion, unlike the deleteTag path used by the same expiry loop in TagBatchCreation. 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 recording TagCallback, bulk-deletes both tags of a snapshot that still exists, and asserts both tag names are reported to notifyDeletion. The test fails if the bulk path skips notification.

API and Format

No.

Documentation

No.

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug] Batch tag expiry skips tag callbacks in deleteAllTagsOfOneSnapshot

1 participant