ChenSammi commented on PR #9364:
URL: https://github.com/apache/ozone/pull/9364#issuecomment-4024047578

   > > Hi @gardenia , is this the second patch, and ready for review?
   > 
   > @ChenSammi Yes. Thank you. The unit testing is not comprehensive but I 
would appreciate some feedback on the general approach (in particular of having 
the HasCompletedRequestInfo interface which response types we want to capture 
have to implement)
   
   @gardenia , I think you can just add the following in each involved 
request's OMClientResponse#addToDBBatch(), addToDBBatch() is well DB is updated 
for each request, and OzoneManagerDoubleBuffer is reponsible to flush the batch 
to DB, so add the CompletedRequestInfoTable update in addToDBBatch should be 
fine.
   
   omMetadataManager.getCompletedRequestInfoTable().putWithBatch(
                 batchOperation, completedRequestInfo.getTrxLogIndex(), 
completedRequestInfo);
   
   For example, OMFileCreateResponse,
   
     public void addToDBBatch(OMMetadataManager omMetadataManager,
                              BatchOperation batchOperation) throws IOException 
{
       super.addToDBBatch(omMetadataManager, batchOperation);
       omMetadataManager.getCompletedRequestInfoTable().putWithBatch(
           batchOperation, getTrxLogIndex(), getCompletedRequestInfoArgs());
     }
   
   updateID in each object is the TrxLogIndex.


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