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


##########
hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSNamesystem.java:
##########
@@ -3738,7 +3738,7 @@ boolean internalReleaseLease(Lease lease, String src, 
INodesInPath iip,
       NameNode.stateChangeLog.warn("BLOCK*" +
           " internalReleaseLease: All existing blocks are COMPLETE," +
           " lease removed, file " + src + " closed.");
-      return true;  // closed!
+      return false;  // closed!

Review Comment:
   @vinayakumarb Thank you for your review. Let me explain the current logic. 
The logic I am modifying now is as follows: if the lease is recovered or the 
lease is reassigned, it will return false, just like the previous logic. Then, 
in the checkLeases method, if the return is false and needSync is false, 
needSync will be reset to true. Subsequently, the edits log will be flushed by 
leaseMonitor. This way, when RPCs such as recoverLease call the 
internalReleaseLease method, they can remain consistent with the original 
behavior.



-- 
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: common-issues-unsubscr...@hadoop.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: common-issues-unsubscr...@hadoop.apache.org
For additional commands, e-mail: common-issues-h...@hadoop.apache.org

Reply via email to