Skip to content

Commit

Permalink
HDDS-11784 get the parent id for MPU even it is missing parent direct…
Browse files Browse the repository at this point in the history
…ories
  • Loading branch information
zhiheng xie committed Jan 14, 2025
1 parent 147318b commit a0c6305
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -899,11 +899,13 @@ public String getMultipartKeyFSO(String volume, String bucket, String key, Strin
final long volumeId = getVolumeId(volume);
final long bucketId = getBucketId(volume,
bucket);
long parentId =
OMFileRequest.getParentID(volumeId, bucketId, key, this);
final String nonFSOMultipartKey =
getMultipartKey(volume, bucket, key, uploadId);
final OmMultipartKeyInfo multipartKeyInfo =
getMultipartInfoTable().get(nonFSOMultipartKey);
long parentId = multipartKeyInfo.getParentID();

String fileName = OzoneFSUtils.getFileName(key);

return getMultipartKey(volumeId, bucketId, parentId,
fileName, uploadId);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
* 3) Delete unused parts.
*/
@CleanupTableInfo(cleanupTables = {OPEN_FILE_TABLE, FILE_TABLE, DELETED_TABLE,
MULTIPARTINFO_TABLE})
MULTIPARTINFO_TABLE, DELETED_TABLE})
public class S3MultipartUploadCompleteResponseWithFSO
extends S3MultipartUploadCompleteResponse {

Expand Down

0 comments on commit a0c6305

Please sign in to comment.