Skip to content

Commit 4c022b6

Browse files
committed
Update delete object log in case of a master version expiration
This does not prevent any race condition but at least leaves a log when it happens. Issue: CLDSRV-613
1 parent 2a486ce commit 4c022b6

1 file changed

Lines changed: 14 additions & 0 deletions

File tree

lib/api/objectDelete.js

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,20 @@ function objectDeleteInternal(authInfo, request, log, isExpiration, cb) {
8787
// versioning has been configured
8888
return next(null, bucketMD, objMD);
8989
}
90+
91+
if (versioningCfg && versioningCfg.Status === 'Enabled' &&
92+
objMD.versionId === reqVersionId && isExpiration) {
93+
log.warn('expiration is trying to delete a master version ' +
94+
'of an object with versioning enabled', {
95+
method: 'objectDeleteInternal',
96+
isExpiration,
97+
reqVersionId,
98+
versionId: objMD.versionId,
99+
replicationState: objMD.replicationInfo,
100+
location: objMD.location,
101+
originOp: objMD.originOp,
102+
});
103+
}
90104
if (reqVersionId && objMD.location &&
91105
Array.isArray(objMD.location) && objMD.location[0]) {
92106
// we need this information for data deletes to AWS

0 commit comments

Comments
 (0)