ChenSammi commented on code in PR #5847:
URL: https://github.com/apache/ozone/pull/5847#discussion_r1442415707


##########
hadoop-ozone/common/src/main/java/org/apache/hadoop/ozone/om/protocolPB/OzoneManagerProtocolClientSideTranslatorPB.java:
##########
@@ -2454,7 +2458,10 @@ public boolean recoverLease(String volumeName, String 
bucketName,
 
     RecoverLeaseResponse recoverLeaseResponse =
             handleError(submitRequest(omRequest)).getRecoverLeaseResponse();
-    return recoverLeaseResponse.getResponse();
+    ArrayList list = new ArrayList();
+    list.add(OmKeyInfo.getFromProtobuf(recoverLeaseResponse.getKeyInfo()));
+    list.add(OmKeyInfo.getFromProtobuf(recoverLeaseResponse.getOpenKeyInfo()));

Review Comment:
   @jojochuang , openKeyInfo is return for client. There is one case, suppose a 
hsynced file, a new block is allocated to it, then client writes some data to 
this new block, and crashes before it calls hsync for data on this new block, 
then the openKeyInfo will have one more block than keyInfo. In this case, If we 
want to recover the last new block length, then we need the openKeyInfo info.  
If we only recover the last block that hsynced ever called, then keyInfo is 
enough. The question is,  what's expectation from user? Does recovering the 
last hsynced block is user's expectation? 



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