Compare commits

...

1 Commits

Author SHA1 Message Date
Dimitrios Vasilas 7028866327 WIP 2023-01-18 10:24:16 -05:00
2 changed files with 14 additions and 3 deletions

View File

@ -195,6 +195,10 @@ function createAndStoreObject(bucketName, bucketMD, objectKey, objMD, authInfo,
}
}
if (objMD && objMD.uploadId) {
metadataStoreParams.oldReplayId = objMD.uploadId;
}
/* eslint-disable camelcase */
const dontSkipBackend = externalBackends;
/* eslint-enable camelcase */

View File

@ -97,7 +97,7 @@ const services = {
lastModifiedDate, versioning, versionId, uploadId,
tagging, taggingCopy, replicationInfo, defaultRetention,
dataStoreName, retentionMode, retentionDate, legalHold,
originOp } = params;
originOp, oldReplayId } = params;
log.trace('storing object in metadata');
assert.strictEqual(typeof bucketName, 'string');
const md = new ObjectMD();
@ -207,6 +207,10 @@ const services = {
md.setLegalHold(legalHold);
}
if (oldReplayId) {
options.oldReplayId = oldReplayId;
}
log.trace('object metadata', { omVal: md.getValue() });
// If this is not the completion of a multipart upload or
// the creation of a delete marker, parse the headers to
@ -273,12 +277,15 @@ const services = {
* @return {undefined}
*/
deleteObject(bucketName, objectMD, objectKey, options, log, cb) {
log.trace('deleting object from bucket');
assert.strictEqual(typeof bucketName, 'string');
assert.strictEqual(typeof objectMD, 'object');
function deleteMDandData() {
return metadata.deleteObjectMD(bucketName, objectKey, options, log,
const delOptions = Object.assign({}, options);
if (objectMD.uploadId) {
delOptions.replayId = objectMD.uploadId;
}
return metadata.deleteObjectMD(bucketName, objectKey, delOptions, log,
(err, res) => {
if (err) {
return cb(err, res);