Avoid rewriting namespace tombstones during repeated deletion - #12009
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
Skip the namespace state update when a repeated deletion finds the namespace already deleted, preventing that activity from recreating a tombstone removed by an earlier reclaim workflow.
Problem
A repeated
DeleteNamespacerequest can run while the earlier asynchronous reclaim workflow is still active.MarkNamespaceDeletedActivitywritesDELETEDeven if it reads that state from persistence. In Cassandra, physical deletion does not advance the notification version, so a reclaim between the activity's read and update allows the stale update to recreate the name row while its ID mapping remains absent.Approach
Return success when the persisted namespace state is already
DELETED. The activity performs no write in that case. Registered and deprecated namespaces still transition to deleted using the existing notification-version check.Validation
Risks, rollout, and scope
This change prevents the repeated-deletion activity from resurrecting an already-deleted namespace. It does not make Cassandra's separate name and ID mutations atomic or repair existing inconsistent rows. A complete persistence-level fix needs an ownership and recovery protocol across those mappings. No schema migration is required for this change. The native interleaving fixture was run separately; the permanent unit regression guards the no-write behavior without adding a database dependency to the worker unit suite.