Hexiaoqiao commented on code in PR #6809:
URL: https://github.com/apache/hadoop/pull/6809#discussion_r1598536353


##########
hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/LeaseManager.java:
##########
@@ -626,7 +626,8 @@ private synchronized boolean checkLeases(Collection<Lease> 
leasesToCheck) {
             }
           }
           // If a lease recovery happened, we need to sync later.

Review Comment:
   > I would recommend you to change the return type of internalReleaseLease() 
to ImmutablePair<Boolean, Boolean> to include both completed and needSync 
values. 
   needSync will be true in both cases of file closed and lease re-assignment.
   
   +1. If we will plan to improve it, should fix it together.
   BTW, what will it happen if not sync in time, LeaseManager.Monitor is one 
asynchronous logic, it can not be ensure to sync edits in one certain order 
right?



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