ivandika3 commented on code in PR #7566:
URL: https://github.com/apache/ozone/pull/7566#discussion_r1906521168
##########
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/request/s3/multipart/S3InitiateMultipartUploadRequestWithFSO.java:
##########
@@ -213,6 +199,9 @@ public OMClientResponse validateAndUpdateCache(OzoneManager
ozoneManager, TermIn
omMetadataManager.getMultipartInfoTable().addCacheEntry(
multipartKey, multipartKeyInfo, transactionLogIndex);
+ if (bucketInfo == null) {
+ throw new IOException("bucketInfo is null");
+ }
Review Comment:
Hm, `validateBucketAndVolume` is already checking the cache as well.
Moreover, the OM request was done under a BUCKET_LOCK, so the bucket should
still exists during the request processing. Bucket not found check should be
earlier before updating any OM state. Moreover, it should be an `OMException`
thrown with `BUCKET_NOT_FOUND` `ResultCodes`.
--
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]