Skip to content
This repository has been archived by the owner on Jan 3, 2024. It is now read-only.

rgw/sfs: Allow multiple delete markers #220

Merged
merged 2 commits into from
Oct 9, 2023

Conversation

0xavi0
Copy link

@0xavi0 0xavi0 commented Oct 3, 2023

This PR changes how delete markers are stored and retrieved. As stated in Amazon
docs
multiple delete markers are allowed and are stacked as just another version.

Another possible reason why this is supported is to track the history of a version.

Fixes: https://github.com/aquarist-labs/s3gw/issues/718
Signed-off-by: Xavi Garcia [email protected]

Checklist

  • Tracker (select at least one)
    • References tracker ticket
    • Very recent bug; references commit where it was introduced
    • New feature (ticket optional)
    • Doc update (no ticket needed)
    • Code cleanup (no ticket needed)
  • Documentation (select at least one)
    • Updates relevant documentation
    • No doc update is appropriate
  • Tests (select at least one)

This PR changes how delete markers are stored and retrieved.
As stated in [Amazon
docs](https://docs.aws.amazon.com/AmazonS3/latest/userguide/ManagingDelMarkers.html)
multiple delete markers are allowed and are stacked as just another
version.

Another possible reason why this is supported is to track the history of
a version.

Fixes: https://github.com/aquarist-labs/s3gw/issues/718
Signed-off-by: Xavi Garcia <[email protected]>
@0xavi0 0xavi0 added the kind/bug Something isn't working label Oct 3, 2023
@0xavi0 0xavi0 self-assigned this Oct 3, 2023
@0xavi0 0xavi0 requested review from irq0 and jecluis October 3, 2023 11:18
@0xavi0 0xavi0 added this to the v0.22.0 milestone Oct 4, 2023
@irq0
Copy link
Member

irq0 commented Oct 5, 2023

Fixes: aquarist-labs/s3gw#718

The IsLatest logic in SQLiteList ::version needs to be adapted to fix issue 718. Should be similar to the changes in this PR (removing the sort by version type)

@0xavi0
Copy link
Author

0xavi0 commented Oct 6, 2023

The IsLatest logic in SQLiteList ::version needs to be adapted to fix issue 718. Should be similar to the changes in this PR (removing the sort by version type)

Oh, right... I forgot about that class, should be fixed now. I also added a small unit test. Thanks!

@0xavi0 0xavi0 merged commit 44ae59d into aquarist-labs:s3gw Oct 9, 2023
5 checks passed
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
kind/bug Something isn't working
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

rgw/sfs: Mark a recovered object version as IsLatest
2 participants