Skip to content

Commit

Permalink
Fix CrrExistingObjects skipping versions when listing
Browse files Browse the repository at this point in the history
The listing function from metadata expects versionIdMarker to equal the non encoded
versionId of the next version to list. However, currently we give it the encoded
versionId, which causes the listing algo to skip some versions, as the versionId
is used to skip all previous versions until versionIdMarker is reached. Using the
encoded versionId in the check results in unpredictable behaviour that can skip
multiple versions from the listing.

Issue: S3UTILS-185
  • Loading branch information
Kerkesni committed Dec 12, 2024
1 parent 1be6653 commit 2be1813
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions CrrExistingObjects/metadataUtils.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,6 @@ const nonVersionedObjId = versionIdUtils.getInfVid(REPLICATION_GROUP_ID);

function _processVersions(list) {
/* eslint-disable no-param-reassign */
list.NextVersionIdMarker = list.NextVersionIdMarker
? versionIdUtils.encode(list.NextVersionIdMarker)
: list.NextVersionIdMarker;

list.Versions.forEach(v => {
v.VersionId = v.VersionId
? versionIdUtils.encode(v.VersionId) : v.VersionId;
Expand Down

0 comments on commit 2be1813

Please sign in to comment.