sokui commented on code in PR #7700:
URL: https://github.com/apache/ozone/pull/7700#discussion_r1922674618
##########
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/OmMetadataManagerImpl.java:
##########
@@ -899,11 +900,26 @@ 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);
-
- String fileName = OzoneFSUtils.getFileName(key);
+ long parentId;
+ try {
+ parentId = OMFileRequest.getParentID(volumeId, bucketId, key, this);
Review Comment:
Yeah. I just follow @ivandika3 suggestion, which is safer. And I tested if I
just use the exception handling way to do it, then
`OMKeyCreateRequestWithFSO#getDBMultipartOpenKey` method will throw exception
when the MPU is aborted (it breaks testAbortUploadSuccessWithParts test). And
this method is used in multiple places. Of course, we can update all these
places. I am just not sure if it is safe. Just try to limit the scope of this
PR. Pls let me know your thoughts
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]