BB-786: trigger cold transition from oplog - #2830
Conversation
Support "direct-to-cold" transitions: when an object is uploaded with a cold storage class, cloudserver stores the data in the hot location and records the requested cold class in the object metadata, together with the transition-in-progress flag. The lifecycle queue populator now detects these objects from the oplog and publishes the cold archive request, reusing the whole existing transition pipeline. The transition-in-progress flag must not be cleared while requeuing such an object, since the flag (and the cold storage class) is what identifies it as pending a direct transition. Conversely, a bucket lifecycle rule must not transition an object which is already declared as cold. The metadata update completing the transition is stamped with a distinct 's3:LifecycleTransition:Direct' origin op, so that consumers can tell a direct transition from a lifecycle-driven one. Issue: BB-786
Hello francoisferrand,My role is to assist you with the merge of this Available options
Available commands
Status report is not available. |
Use optional chaining and drop the single-use helper, in line with the rest of the lifecycle code. Issue: BB-786
Branches have divergedThis pull request's source branch To avoid any integration risks, please re-synchronize them using one of the
Note: If you choose to rebase, you may have to ask me to rebuild |
Codecov Report❌ Patch coverage is
Additional details and impacted files
... and 4 files with indirect coverage changes
@@ Coverage Diff @@
## development/9.6 #2830 +/- ##
===================================================
- Coverage 74.39% 74.16% -0.24%
===================================================
Files 201 201
Lines 13490 13540 +50
===================================================
+ Hits 10036 10042 +6
- Misses 3444 3488 +44
Partials 10 10
Flags with carried forward coverage won't be shown. Click here to find out more. 🚀 New features to boost your workflow:
|
Support "direct-to-cold" transitions: an object uploaded with a cold storage class must end up archived in that cold location, without waiting for a lifecycle rule.
Cloudserver (out of scope here) stores the data in the hot location on such a PUT, and records the requested cold class in
x-amz-storage-classtogether with the transition-in-progress flag, while keeping the ordinary create origin op so that bucket notifications still fire.The lifecycle queue populator now detects these objects from the MongoDB oplog and publishes the cold archive request, reusing the exact message shape of
ReplicationAPI.sendDataMoverAction: the whole downstream pipeline (Sorbet -> cold status topic ->LifecycleColdStatusArchiveTask-> GC) is unchanged. The populator is strictly publish-only, and never writes object metadata. The discriminator only accepts origin ops that backbeat itself never writes, so a transition is never re-triggered by its own metadata updates; objects already holdingarchive.archiveInfoare excluded, while a pending deferred restore is not.The transition-in-progress flag must be kept when requeuing such an object, since that flag (together with the cold storage class) is precisely what identifies it as pending: clearing it would hide the object from the populator and break the retry loop after a single attempt. Conversely, a bucket lifecycle rule must not transition an object which is already declared as cold.
Finally, the metadata update completing the transition is stamped with a distinct
s3:LifecycleTransition:Directorigin op when the object already declared the target cold class, so consumers can tell a direct transition from a lifecycle-driven one.Issue: BB-786