-
Notifications
You must be signed in to change notification settings - Fork 252
Ft/s3 c 1179/gcp s3 mpu #1123
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Ft/s3 c 1179/gcp s3 mpu #1123
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -201,7 +201,8 @@ function objectPutPart(authInfo, request, streamingV4Params, log, | |
| // if data backend handles MPU, skip to end of waterfall | ||
| return next(skipError, destinationBucket, | ||
| partInfo.dataStoreETag); | ||
| } else if (partInfo && partInfo.dataStoreType === 'azure') { | ||
| } else if (partInfo && | ||
| constants.s3HandledBackends[partInfo.dataStoreType]) { | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
| return next(null, destinationBucket, | ||
| objectLocationConstraint, cipherBundle, splitter, | ||
| partInfo); | ||
|
|
@@ -250,7 +251,8 @@ function objectPutPart(authInfo, request, streamingV4Params, log, | |
| (destinationBucket, objectLocationConstraint, cipherBundle, | ||
| partKey, prevObjectSize, oldLocations, partInfo, next) => { | ||
| // NOTE: set oldLocations to null so we do not batchDelete for now | ||
| if (partInfo && partInfo.dataStoreType === 'azure') { | ||
| if (partInfo && | ||
| constants.skipBatchDeleteBackends[partInfo.dataStoreType]) { | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
| // skip to storing metadata | ||
| return next(null, destinationBucket, partInfo, | ||
| partInfo.dataStoreETag, | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,5 +1,5 @@ | ||
| const { errors } = require('arsenal'); | ||
| const { createMpuKey, logger } = require('../GcpUtils'); | ||
| const { getPartNumber, createMpuKey, logger } = require('../GcpUtils'); | ||
| const { logHelper } = require('../../utils'); | ||
|
|
||
| /** | ||
|
|
@@ -19,9 +19,16 @@ function uploadPartCopy(params, callback) { | |
| logHelper(logger, 'error', 'error in uploadPartCopy', error); | ||
| return callback(error); | ||
| } | ||
| const partNumber = getPartNumber(params.PartNumber); | ||
| if (!partNumber) { | ||
| const error = errors.InvalidArgument | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Update description similar to |
||
| .customizeDescription('PartNumber is not a number'); | ||
| logHelper(logger, 'debug', 'error in uploadPartCopy', error); | ||
| return callback(error); | ||
| } | ||
| const mpuParams = { | ||
| Bucket: params.Bucket, | ||
| Key: createMpuKey(params.Key, params.UploadId, params.PartNumber), | ||
| Key: createMpuKey(params.Key, params.UploadId, partNumber), | ||
| CopySource: params.CopySource, | ||
| }; | ||
| return this.copyObject(mpuParams, callback); | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are we actually storing MD on GCP like we do for AWS S3? Because for AWS we do initiate mpu but for GCP we emulate MPU.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes. On initiate MPU, a 0-byte object will be created to hold the metadata for the final object.