Repository navigation
fix(shard): always orphan PVCs on scale-down instead of hard-deleting - #663
Merged
niconosenzo merged 2 commits intoSep 22, 2026
Merged
Conversation
niconosenzo
force-pushed
the
switch-PVC-to-soft-deletes
branch
2 times, most recently
from
September 18, 2026 09:33
4e91204 to
bf11e9c
Compare
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
niconosenzo
force-pushed
the
switch-PVC-to-soft-deletes
branch
2 times, most recently
from
September 18, 2026 11:47
08569be to
a8a3a05
Compare
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
niconosenzo
force-pushed
the
switch-PVC-to-soft-deletes
branch
from
September 18, 2026 13:08
a8a3a05 to
15a2c6c
Compare
This comment has been minimized.
This comment has been minimized.
niconosenzo
force-pushed
the
switch-PVC-to-soft-deletes
branch
from
September 18, 2026 13:18
15a2c6c to
7bd0400
Compare
niconosenzo
marked this pull request as ready for review
September 18, 2026 13:19
This comment has been minimized.
This comment has been minimized.
Verolop
reviewed
Sep 18, 2026
Verolop
approved these changes
Sep 18, 2026
Always orphan instead and let multigres-gc reclaim after the retention window, except when the owning MultigresCluster is being deleted, where there is nothing left to roll back to. Signed-off-by: Nicolas Nosenzo <niconosenzo@gmail.com>
niconosenzo
force-pushed
the
switch-PVC-to-soft-deletes
branch
from
September 22, 2026 15:06
7bd0400 to
4d85f0c
Compare
Contributor
Author
|
/e2e |
This comment has been minimized.
This comment has been minimized.
The finalizer was dropped before Shards finished deleting, so clusterIsChurning saw NotFound and orphaned PVCs on cluster teardown. Requeue until Shards, TableGroups, and Cells are gone. Signed-off-by: Nicolas Nosenzo <niconosenzo@gmail.com>
niconosenzo
force-pushed
the
switch-PVC-to-soft-deletes
branch
from
September 22, 2026 15:15
4d85f0c to
c2e1ee3
Compare
Contributor
Author
|
/e2e |
🔬 Go Test Coverage ReportSummary
Status✅ PASS DetailShow New Coverage |
|
✅ E2E tests success — View run |
|
✅ E2E tests success — View run |
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.
Description
Removes the replica-count threshold that decided between orphaning a PVC (deferred deletion via multigres-gc) and hard-deleting it in-line during pool scale-down and shard removal.
Now: PVC cleanup during scale-down/drain/replace/shard-removal always orphans, unconditionally. The only case that still hard-deletes in-line is when the owning MultigresCluster itself is being deleted, at that point there's nothing to roll a scale-down back to, so there's no reason to wait out the retention window.
Changes
pvcOrphanReplicasThreshold/orphanByRemainingCount(the hard-delete-past-threshold logic) from shard_controller.go.