Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

INTEGRATION [PR#1944 > development/8.1] Feature: ARSN-235 update object before deleting it #2010

Conversation

bert-e
Copy link
Contributor

@bert-e bert-e commented Sep 13, 2022

This pull request has been created automatically.
It is linked to its parent pull request #1944.

Do not edit this pull request directly.
If you need to amend/cancel the changeset on branch
w/8.1/feature/ARSN-235-update-object-before-deleting-it, please follow this
procedure:

 $ git fetch
 $ git checkout w/8.1/feature/ARSN-235-update-object-before-deleting-it
 $ # <amend or cancel the changeset by _adding_ new commits>
 $ git push origin w/8.1/feature/ARSN-235-update-object-before-deleting-it

Please always comment pull request #1944 instead of this one.

Kerkesni and others added 5 commits September 13, 2022 15:56
Object deletion no longer directly deletes the object, it first
updates its metadata by setting the deletion flag and originOp then
proceeds to deleting the object.

This is done to keep a trace of the latest object metadata before deletion
in the oplog, as oplog delete events don't hold that information. This
information is needed for both Cold Storage and Bucket Notification

We also add all the object metadata to the placeholder (PHD) master
which wasn't previously the case, again this is done to keep the metadata
in the oplog as a PHD might get directly deleted in the repair phase.
… tmp/octopus/w/8.1/feature/ARSN-235-update-object-before-deleting-it
Deletion flag serves showing that an object is in the process of
beeing deleted, the object's metadata is updated with deletion flag
set to true before deleting it to keep a trace of the latest metadata
inside the oplog as normal mongo delete events don't contain any metadata.
The "isPHD" flag serves showing that a master object is in a temporary
invalid state that gets repaired asynchronously after a certain period
of time. The repair either updates the metadata or deletes the master
object.

This invalid state happens when deleting the last version of an object.
Previously the "isPHD" flag was set directly inside the object metadata
without going through the ObjectMD model, which is not ideal.
@codecov-commenter
Copy link

Codecov Report

Merging #2010 (eb121d8) into development/8.1 (4e8a907) will increase coverage by 0.06%.
The diff coverage is 85.71%.

@@                 Coverage Diff                 @@
##           development/8.1    #2010      +/-   ##
===================================================
+ Coverage            63.83%   63.89%   +0.06%     
===================================================
  Files                  206      206              
  Lines                15593    15644      +51     
  Branches              3179     3187       +8     
===================================================
+ Hits                  9954     9996      +42     
- Misses                5623     5632       +9     
  Partials                16       16              
Impacted Files Coverage Δ
...orage/metadata/mongoclient/MongoClientInterface.js 67.64% <83.07%> (+0.21%) ⬆️
lib/constants.ts 100.00% <100.00%> (ø)
lib/models/ObjectMD.ts 89.47% <100.00%> (+0.78%) ⬆️
lib/storage/metadata/mongoclient/readStream.js 68.29% <100.00%> (+0.39%) ⬆️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@bert-e bert-e closed this Oct 25, 2022
@bert-e bert-e closed this Oct 25, 2022
@bert-e bert-e deleted the w/8.1/feature/ARSN-235-update-object-before-deleting-it branch October 25, 2022 16:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants