Confirm omitted namespaces before evicting registry entries - #12012
Draft
taylan-oai wants to merge 1 commit into
Draft
taylan-oai wants to merge 1 commit into
taylan-oai wants to merge 1 commit into
Conversation
|
|
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.
Summary
Verify cached namespaces omitted from a refresh by ID before evicting them, preventing a concurrent rename from being reported as physical deletion.
Problem
Cassandra lists namespaces in name order, with separate reads for each page. A rename from beyond the current cursor to before it can leave a live namespace out of the completed scan. The registry currently removes that cached ID and invokes deletion callbacks.
Approach
Look up each omitted cached ID before reconciling the refresh. A namespace that still exists goes through the existing name, state, and callback reconciliation.
NamespaceNotFoundconfirms physical deletion. Other lookup or conversion errors abort the refresh before swapping the cache or delivering callbacks. When reconciling a rename, remove its old-name mapping only if that mapping still belongs to the same namespace; a newly created namespace can already have reused the name.Validation
Risks, rollout, and scope
Each omitted cached ID adds one persistence read, including actual deletions. Complete scans add no reads. A failed verification delays the whole refresh until its existing retry path succeeds, preserving the prior cache and queued callbacks. This does not give paginated namespace listing a consistent snapshot or change Cassandra's rename and deletion protocols.