Skip to content

Commit

Permalink
[DEBUG] test
Browse files Browse the repository at this point in the history
  • Loading branch information
Kerkesni committed Oct 1, 2024
1 parent cd7fcdc commit a16a3c9
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
1 change: 1 addition & 0 deletions lib/api/apiUtils/object/versioning.js
Original file line number Diff line number Diff line change
Expand Up @@ -522,6 +522,7 @@ function overwritingVersioning(objMD, metadataStoreParams) {
// as it's calculated based on the etags of the parts. We keep the original
// etag to allow proper exxpiration of the restored object.
if (metadataStoreParams.contentMD5 !== objMD['content-md5']) {
metadataStoreParams.restoredEtag = metadataStoreParams.contentMD5;
metadataStoreParams.contentMD5 = objMD['content-md5'];
}

Expand Down
5 changes: 3 additions & 2 deletions lib/services.js
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,8 @@ const services = {
tagging, taggingCopy, replicationInfo, defaultRetention,
dataStoreName, creationTime, retentionMode, retentionDate,
legalHold, originOp, updateMicroVersionId, archive, oldReplayId,
deleteNullKey, amzStorageClass, overheadField, needOplogUpdate } = params;
deleteNullKey, amzStorageClass, overheadField, needOplogUpdate,
restoredEtag } = params;
log.trace('storing object in metadata');
assert.strictEqual(typeof bucketName, 'string');
const md = new ObjectMD();
Expand Down Expand Up @@ -200,7 +201,7 @@ const services = {
md.setAmzRestore({
'ongoing-request': false,
'expiry-date': archive.restoreWillExpireAt,
'etag': contentMD5,
'etag': restoredEtag,
});
}

Expand Down

0 comments on commit a16a3c9

Please sign in to comment.