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

Bucket versioning in Posix #708

Merged
merged 5 commits into from
Sep 20, 2024
Merged

Bucket versioning in Posix #708

merged 5 commits into from
Sep 20, 2024

Conversation

0x180
Copy link
Contributor

@0x180 0x180 commented Jul 31, 2024

Implemented bucket object versioning in the POSIX backend.
Closes #678

This PR covers the following features:

  1. Implementation of the PutBucketVersioning action in POSIX
  2. Implementation of the GetBucketVersioning action in POSIX
  3. Implementation of the ListObjectVersions action in POSIX
  4. Object versioning when creating a new object with PutObject and CopyObject actions
  5. Handling GetObject and HeadObject actions for object versions
  6. Implementation of the DeleteObject(s) action for versioning, marking the object/version as a delete marker

Gateway Workflow (when versioning is enabled for the bucket):

The gateway automatically adds a unique version ID to every object stored or deleted (using PUT, POST, CopyObject, or DeleteObject(s)) in the bucket.

Object Creation:

When a user tries to overwrite an existing object, the gateway moves the existing version to the versioning directory and then creates the newly added object in the POSIX root.

Object Deletion:

When a user tries to delete an object in a versioning-enabled bucket, the gateway marks the object as a delete marker. If a user specifies a versionId in DeleteObject, it permanently deletes that specific object version. If a user permanently deletes the latest version (stored in the POSIX root), the gateway finds the most recent version from the versioning directory and moves it to the POSIX root to make it the latest version.

@0x180 0x180 marked this pull request as draft July 31, 2024 21:18
@0x180 0x180 marked this pull request as ready for review August 8, 2024 19:47
@0x180 0x180 force-pushed the object-versioning branch 2 times, most recently from d5f4e5f to 95e62d2 Compare August 8, 2024 20:35
… backend

New posix backend option --versioning-dir will enable storing object versions
in specified directory.
…uple of bug fixes in the versioning implementation
…d integration tests for the versioning implementation for multipart uploads
@benmcclelland benmcclelland merged commit 53415cc into main Sep 20, 2024
17 checks passed
@benmcclelland benmcclelland deleted the object-versioning branch September 20, 2024 16:38
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.

Object Versioning for posix/scoutfs
2 participants