Skip to content

Commit

Permalink
ft(ARSN-75): Add support for AbortMPU PUT
Browse files Browse the repository at this point in the history
  • Loading branch information
tmacro committed Feb 23, 2022
1 parent 51c5247 commit 1bafcd4
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lib/storage/metadata/file/BucketFileInterface.js
Original file line number Diff line number Diff line change
Expand Up @@ -205,6 +205,10 @@ class BucketFileInterface {
if (err) {
return cb(err);
}
// Ignore the PUT done by AbortMPU
if (params && params.isAbort && params.replayId) {
return cb();
}
db.withRequestLogger(log)
.put(objName, JSON.stringify(objVal), params, (err, data) => {
if (err) {
Expand Down
5 changes: 5 additions & 0 deletions lib/storage/metadata/in_memory/metastore.js
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,11 @@ const metastore = {

putObject: (bucketName, objName, objVal, params, log, cb) => {
process.nextTick(() => {
// Ignore the PUT done by AbortMPU
if (params && params.isAbort && params.replayId) {
cb();
return;
}
metastore.getBucketAttributes(bucketName, log, err => {
if (err) {
return cb(err);
Expand Down

0 comments on commit 1bafcd4

Please sign in to comment.