versitygw
versitygw copied to clipboard
[Bug] - null VersionId is incorrectly updated after versioning is enabled and key is updated
Describe the bug Direct to s3, if the following sequence happens:
- bucket creation
- file added
- versioning enabled
- file updated
then there are two
Version
fields, one, referencing the version prior to versioning being enabled, with aVersionId
ofnull
and aLastModified
timestamp matching when the file was initially added.
However, with versitygw, when this sequence occurs, the prior version is incorrectly assigned a non-null VersionId
, and the LastModified
timestamp is within milliseconds of the updated version timestamp, probably corresponding to the incorrect version update.
To Reproduce
- Create a bucket
- Add a file
- Enable versioning on the bucket
- Update the file
- List the object versions
Expected behavior
versitygw data matches that of direct-to-s3 (pre-enabledVersionId
remains null, and LastModified
timestamp corresponds to when the file was first added).
Server Version Version : v1.0.7 Build : 3f7ada1 BuildTime: 2024-10-03_10:26:10PM Darwin Lukes-MacBook-Pro.local 23.4.0 Darwin Kernel Version 23.4.0: Fri Mar 15 00:12:25 PDT 2024; root:xnu-10063.101.17~1/RELEASE_ARM64_T6030 arm64