k5342 opened a new pull request, #4048:
URL: https://github.com/apache/ozone/pull/4048

   ## What changes were proposed in this pull request?
   When `keyToDelete.getDataSize()` returns zero and a request for FSO-enable 
bucket, a `CompleteMultipartUpload` request will crash with 
NullPointerException by attempting to read a bucketInfo. This patch proposes to 
prevent crash that changes not to read bucketInfo in the request handler.
   
   ```
   2022-12-02 20:48:24,809 [OMDoubleBufferFlushThread] ERROR 
org.apache.hadoop.ozone.om.ratis.OzoneManagerDoubleBuffer: Terminating with 
exit status 2: OMDoubleBuffer flush thread OMDoubleBufferFlushThread 
encountered Throwable error
   java.lang.NullPointerException: Cannot invoke 
"org.apache.hadoop.ozone.om.helpers.OmBucketInfo.getObjectID()" because the 
return value of 
"org.apache.hadoop.ozone.om.response.s3.multipart.S3MultipartUploadCompleteResponseWithFSO.getOmBucketInfo()"
 is null
           at 
org.apache.hadoop.ozone.om.response.s3.multipart.S3MultipartUploadCompleteResponseWithFSO.addToKeyTable(S3MultipartUploadCompleteResponseWithFSO.java:90)
           at 
org.apache.hadoop.ozone.om.response.s3.multipart.S3MultipartUploadCompleteResponse.addToDBBatch(S3MultipartUploadCompleteResponse.java:101)
           at 
org.apache.hadoop.ozone.om.response.OMClientResponse.checkAndUpdateDB(OMClientResponse.java:73)
           at 
org.apache.hadoop.ozone.om.ratis.OzoneManagerDoubleBuffer.lambda$2(OzoneManagerDoubleBuffer.java:283)
           at 
org.apache.hadoop.ozone.om.ratis.OzoneManagerDoubleBuffer.addToBatchWithTrace(OzoneManagerDoubleBuffer.java:228)
           at 
org.apache.hadoop.ozone.om.ratis.OzoneManagerDoubleBuffer.lambda$1(OzoneManagerDoubleBuffer.java:281)
           at java.base/java.util.Iterator.forEachRemaining(Iterator.java:133)
           at 
org.apache.hadoop.ozone.om.ratis.OzoneManagerDoubleBuffer.flushTransactions(OzoneManagerDoubleBuffer.java:277)
           at java.base/java.lang.Thread.run(Thread.java:833)
   ```
   
   ## What is the link to the Apache JIRA
   https://issues.apache.org/jira/browse/HDDS-7596
   
   ## How was this patch tested?
   - checked manually in our environment
   - fix annotations to CheckForNull


-- 
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]

Reply via email to