Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Implemented bucket object versioning in the POSIX backend.
Closes #678
This PR covers the following features:
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.