Copilot commented on code in PR #11214:
URL: https://github.com/apache/ozone/pull/11214#discussion_r3944395220


##########
hadoop-hdds/framework/src/main/java/org/apache/hadoop/hdds/utils/RDBSnapshotProvider.java:
##########
@@ -109,14 +112,16 @@ public DBCheckpoint downloadDBSnapshotFromLeader(String 
leaderNodeID)
         "reloading state from the snapshot.", leaderNodeID);
     checkLeaderConsistency(leaderNodeID);
     int numParts = 0;
+    int numNoProgressParts = 0;
+    int numFiles = HAUtils.getExistingFiles(candidateDir).size();

Review Comment:
   `downloadDBSnapshotFromLeader()` now walks `candidateDir` via 
`HAUtils.getExistingFiles()` after every part to detect no-progress parts. The 
concrete `downloadSnapshot()` implementations (e.g., `OmRatisSnapshotProvider` 
/ `ReconRDBSnapshotProvider`) already walk the same directory each part to 
build the exclude list, so this adds an extra full directory traversal per part 
and can be costly when the candidate dir has many files.



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