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

rgw/sfs: mark all OPEN versions DELETED on startup #234

Merged

Conversation

tserong
Copy link
Member

@tserong tserong commented Oct 20, 2023

All OPEN versions that exist on startup are due to aborted uploads. Setting them to DELETED allows us to free up space leveraging the GC.

Tested by running s3cmd --limit-rate 1000 put obj.1mb.bin s3://foo/slow and hitting CTRL-C after a few seconds to leave an open object lying around, then restarting s3gw and looking for "marked 1 open objects deleted" in the debug logs.

Fixes: https://github.com/aquarist-labs/s3gw/issues/624

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)

@tserong tserong requested review from jecluis, irq0 and 0xavi0 October 20, 2023 12:31
@tserong tserong force-pushed the wip-set-open-to-deleted-on-startup branch from 8556363 to 94cbb5d Compare October 20, 2023 12:33
jecluis
jecluis previously approved these changes Oct 22, 2023
@jecluis jecluis added kind/enhancement Change that positively impacts existing code area/rgw-sfs RGW & SFS related labels Oct 22, 2023
@jecluis jecluis added this to the v0.23.0 milestone Oct 22, 2023
All OPEN versions that exist on startup are due to aborted uploads.
Setting them to DELETED allows us to free up space leveraging the GC.

Tested by running `s3cmd --limit-rate 1000 put obj.1mb.bin s3://foo/slow`
and hitting CTRL-C after a few seconds to leave an open object lying
around, then restarting s3gw and looking for "marked 1 open objects deleted"
in the debug logs.

Fixes: https://github.com/aquarist-labs/s3gw/issues/624
Signed-off-by: Tim Serong <[email protected]>
@tserong tserong force-pushed the wip-set-open-to-deleted-on-startup branch from 94cbb5d to 3a1895f Compare October 24, 2023 04:30
@tserong tserong requested review from irq0 and jecluis October 24, 2023 04:32
@jecluis jecluis merged commit 7744b04 into aquarist-labs:s3gw Oct 24, 2023
5 checks passed
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area/rgw-sfs RGW & SFS related kind/enhancement Change that positively impacts existing code
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

On Startup Flip all OPEN versions to DELETED
3 participants