Never garbage-collect data on an isCRR location - #2828
Open
francoisferrand wants to merge 2 commits into
Open
Conversation
Contributor
Hello francoisferrand,My role is to assist you with the merge of this Available options
Available commands
Status report is not available. |
Contributor
Codecov Report❌ Patch coverage is
Additional details and impacted files
... and 4 files with indirect coverage changes
@@ Coverage Diff @@
## development/9.6 #2828 +/- ##
===================================================
- Coverage 75.77% 75.61% -0.16%
===================================================
Files 200 201 +1
Lines 13922 13948 +26
===================================================
- Hits 10549 10547 -2
- Misses 3363 3391 +28
Partials 10 10
Flags with carried forward coverage won't be shown. Click here to find out more. 🚀 New features to boost your workflow:
|
francoisferrand
marked this pull request as ready for review
August 24, 2026 08:31
Data sitting on an isCRR location is production data owned by a remote site: we may read it, but deleting it is never ours to do. The copy engine reuses the lifecycle transition pipeline, which garbage-collects the from-location once the new one is merged into the metadata - against an isCRR source that would wipe the remote production copy. Unlike a transition, a localization merge must therefore leave the from-location alone. Keying this on the location type rather than making it a clean-room special case also gives us replay safety for duplicate copy actions: the second merge supersedes the first and collects its copy, which is only safe because the first never touched the remote source. Issue: BB-813
Same no-GC rule as in the copy engine, applied where data actually gets deleted: whatever published the deleteData action, parts living on an isCRR location are remote production data and get skipped rather than deleted. That covers every publisher, notably restored-object expiration, where expiring a clean-room object that was never localized would otherwise delete the production copy. Reaching the GC service with such a location means something upstream is wrong, so it warns, but deleting is never the right answer: the entry is still completed and the offset committed, and no completion metric is emitted for a delete that did not happen. Issue: BB-818
francoisferrand
force-pushed
the
improvement/BB-813
branch
from
August 24, 2026 08:48
750b874 to
c5a5e88
Compare
francoisferrand
marked this pull request as draft
August 24, 2026 12:39
francoisferrand
marked this pull request as ready for review
August 24, 2026 12:40
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.
Data living on an
isCRRlocation is production data owned by a remote site. We may read it (that is the whole point of localizing a clean room object), but we must never delete it. That is a general rule keyed on the location type, not a clean room conditional and not behind a config flag.It needs to hold at two independent points, one commit each:
BB-813 - do not trigger the GC. The copy engine reuses the lifecycle transition pipeline:
CopyLocationTaskcopies the data locally, thenLifecycleUpdateTransitionTaskmerges the new location into the metadata and publishes adeleteDataaction for the old one. Against anisCRRsource that would wipe the remote production copy, so unlike a transition, the localization merge leaves the from-location alone and publishes nothing when there is nothing left to collect. This also gives us replay safety for duplicate copy actions: the second merge supersedes the first and collects its copy, which is only safe because the first never touched the remote source.BB-818 - guard the GC service. The same rule applied where data actually gets deleted, per location part, whatever published the action. It matters on its own: restored-object expiration goes through a different publisher, so expiring a clean room object that was never localized would otherwise delete the production copy. Reaching the GC service with an
isCRRlocation means something upstream is wrong, so it warns, but deleting is never the right answer - the entry is still completed and the offset committed, and no completion metric is emitted for a delete that did not happen.The two share a small
lib/util/locations.jshelper, which is why they are in one PR rather than two.This is a prerequisite for BB-814 (#2826), which is what starts publishing
copyLocationactions for clean room objects; it should not be enabled in a real clean room without this. There is no code dependency on that branch though - the two are independent apart from the sharedlocation-crr-sourcetest fixture, which is byte-identical on both.One test-only side effect worth flagging: adding a location to the
conf/locationConfig.jsonfixture breaks aCircuitBreakerGroupcase that deep-compares a probe array built from every location, so its expectations are updated here too.Issue: BB-813
Issue: BB-818