Repository navigation
fix(pools): keep the latest copy when a delete fails in one pool - #257
Merged
Merged
Conversation
Signed-off-by: Denis Babchuk <babchukdenis@icloud.com>
Signed-off-by: Denis Babchuk <babchukdenis@icloud.com>
7 of 12 tasks
…fety Signed-off-by: Feng Ruohang <rh@vonng.com>
Resolve each addressed version under the shared write lock, keep bulk I/O parallel within cleanup and authoritative-deletion stages, and preserve replication response identity on errors. Treat reliable absence as successful physical cleanup on retries without accepting it for marker or replication-state writes. Cover execution-time faults, partial cleanup recovery, mixed authoritative pools, response identity, null marker ordering, metadata uncertainty, cancellation, and concurrent PUT. Run the delete consistency regressions under race in CI. Signed-off-by: Feng Ruohang <rh@vonng.com>
Reuse deleteObjectReconciled for tiered bulk entries and unversioned single deletes. Its reference-aware cleanup avoids scheduling remote contents for garbage collection while another copy still needs them, including restored copies. Keep the normal local-data bulk path unchanged. Extend existing tier GC regressions to bulk and unversioned deletes and include them in the multi-pool race CI step. Signed-off-by: Feng Ruohang <rh@vonng.com>
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.
Contribution Licensing (no CLA, inbound=outbound, DCO required)
This pull request contributes to PGSTY SILO (
pgsty/silo). Code contributionsare accepted under AGPL-3.0-or-later, the same license as the server.
This project does not use a CLA or require a separate Apache-2.0 license grant.
By submitting this pull request I represent that I have the right to contribute
the code changes under this repository's
GNU Affero General Public License v3.0 or later
and retain copyright in my original work. Existing copyright and license
notices remain intact; separately licensed material keeps its applicable terms.
Every commit must carry a DCO
Signed-off-bytrailer(
git commit -s) certifying theDeveloper Certificate of Origin — see
CONTRIBUTING.md.
Description
Fixes #256. A failed multi-pool delete must not remove the authoritative copy while an older copy remains, and a bulk response must report failures for the correct key/version.
Single-object deletion retires older copies first. Bulk data deletion resolves each addressed object/version under the shared write lock, batches cleanup of every non-authoritative pool, then deletes only the authoritative copies whose cleanup succeeded. Pools remain parallel within each stage. A failed item does not roll back unrelated successful items. The online-drive check remains an early rejection of known quorum loss, not the consistency guarantee.
The change also preserves replication state in early error results, so the HTTP handler can map every failure back to its original request item. Retrying partial physical deletions combines successful removals and reliable already-absent replies toward quorum; marker creation and replication-state updates still require successful writes. Marker creation follows explicit data/version removal within a mixed batch, preserving suspended null-marker behavior.
Tiered and restored copies use the existing per-object reconciliation, so retiring one copy cannot queue a shared remote object for premature garbage collection. This also covers unversioned single DELETE. Ordinary local data retains staged bulk I/O.
Delete-marker placement for single DELETE skips known unwritable pools when another readable copy can accept it. No overwrite affinity, allocation-policy change, global setting, dependency change, or storage-format change is introduced. The branch includes current main and does not depend on #245.
Validation
cmdandinternal/...regressions, related Object Lock/migration/API race tests,go vet ./...,go build ./...,make build, andmake verifierspass. The optionaltyposexecutable is absent locally; the other verifiers ran. After the tier follow-up, the final combined delete/tier/quorum race suite passed three runs, and final-head CI reran full packages.a2073d25142ced87b9bde8afa38aef2d0383768e.Compatibility and cost
Multi-pool data deletion adds bounded metadata lookup and two bulk I/O stages while holding the shared key locks. Single-pool scheduling and marker-only batching retain their existing paths. Tiered/restored data uses sequential per-item reconciliation within that subset; ordinary local data continues to use bulk I/O. SDK HTTP-200 per-item errors require the caller to handle failed items; automatic transport retry is not a data-consistency mechanism. Old coordinators retain the previous behavior during a rolling upgrade. No release or deployment is part of this PR.