versitygw icon indicating copy to clipboard operation
versitygw copied to clipboard

[Bug] - null VersionId is incorrectly updated after versioning is enabled and key is updated

Open lrm25 opened this issue 4 months ago • 0 comments

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 a VersionId of null and a LastModified 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

  1. Create a bucket
  2. Add a file
  3. Enable versioning on the bucket
  4. Update the file
  5. 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

lrm25 avatar Oct 03 '24 22:10 lrm25