-
Notifications
You must be signed in to change notification settings - Fork 1.7k
[ENH][wal3] Make GC be delete-free for log/gc/GARBAGE #4904
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
Conversation
AWS doesn't support delete of things with an If-Match header except in directory buckets and we are not using those. Instead overwrite using the same hand-over-hand pattern as the manifest. Load a GC, decide what to do while holding on the the ETag, and then overwrite the garbage with a sentinel rather than deleting it.
Reviewer ChecklistPlease leverage this checklist to ensure your code review is thorough before approving Testing, Bugs, Errors, Logs, Documentation
System Compatibility
Quality
|
Refactor GC to Overwrite 'log/gc/GARBAGE' Instead of Deleting (AWS S3 Compatibility) This PR updates the WAL3 garbage collection logic to accommodate AWS S3's lack of support for conditional deletes (i.e., delete with If-Match header) outside of directory buckets. Instead of deleting the 'log/gc/GARBAGE' object, the implementation now uses a 'sentinel' overwrite pattern: the file is overwritten (using ETag for concurrency safety) with an empty/sentinel value after processing, similar to the manifest update mechanism. The change adds a recursive GC mechanism and enhances the handling of garbage object state transitions for durability and correctness. Key Changes: Affected Areas: This summary was automatically generated by @propel-code-bot |
## Description of changes AWS doesn't support delete of things with an If-Match header except in directory buckets and we are not using those. Instead overwrite using the same hand-over-hand pattern as the manifest. Load a GC, decide what to do while holding on the the ETag, and then overwrite the garbage with a sentinel rather than deleting it. ## Test plan CI - [wal3] Tests pass locally with `pytest` for python, `yarn test` for js, `cargo test` for rust ## Documentation Changes N/A
This PR cherry-picks the commit 26b8c16 onto rc/2025-06-20. If there are unresolved conflicts, please resolve them manually. Co-authored-by: Robert Escriva <robert@trychroma.com>
## Description of changes AWS doesn't support delete of things with an If-Match header except in directory buckets and we are not using those. Instead overwrite using the same hand-over-hand pattern as the manifest. Load a GC, decide what to do while holding on the the ETag, and then overwrite the garbage with a sentinel rather than deleting it. ## Test plan CI - [wal3] Tests pass locally with `pytest` for python, `yarn test` for js, `cargo test` for rust ## Documentation Changes N/A
Description of changes
AWS doesn't support delete of things with an If-Match header except in
directory buckets and we are not using those. Instead overwrite using
the same hand-over-hand pattern as the manifest. Load a GC, decide
what to do while holding on the the ETag, and then overwrite the garbage
with a sentinel rather than deleting it.
Test plan
CI
pytest
for python,yarn test
for js,cargo test
for rustDocumentation Changes
N/A