Skip to content

Commit b712df6

Browse files
committed
Merge branch 'feature/CLDSRV-243-allow-backbeat-to-update-non-versioned-objects' into q/8.5
2 parents 51e28de + 356c9f1 commit b712df6

File tree

2 files changed

+10
-8
lines changed

2 files changed

+10
-8
lines changed

lib/routes/routeBackbeat.js

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -472,13 +472,15 @@ function putMetadata(request, response, bucketInfo, objMd, log, callback) {
472472
omVal[headerName] = objMd[headerName];
473473
});
474474
}
475-
// specify both 'versioning' and 'versionId' to create a "new"
476-
// version (updating master as well) but with specified
477-
// versionId
478-
const options = {
479-
versioning: bucketInfo.isVersioningEnabled(),
480-
versionId: omVal.versionId,
481-
};
475+
const options = {};
476+
if (omVal.versionId || omVal.replicationInfo.isNFS) {
477+
// specify both 'versioning' and 'versionId' to create a "new"
478+
// version (updating master as well) but with specified
479+
// versionId
480+
options.versioning = bucketInfo.isVersioningEnabled();
481+
options.versionId = omVal.versionId;
482+
}
483+
482484
// If the object is from a source bucket without versioning (i.e. NFS),
483485
// then we want to create a version for the replica object even though
484486
// none was provided in the object metadata value.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@zenko/cloudserver",
3-
"version": "8.5.5",
3+
"version": "8.5.8",
44
"description": "Zenko CloudServer, an open-source Node.js implementation of a server handling the Amazon S3 protocol",
55
"main": "index.js",
66
"engines": {

0 commit comments

Comments
 (0)