adoroszlai commented on a change in pull request #1569:
URL: https://github.com/apache/ozone/pull/1569#discussion_r524940891
##########
File path:
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/KeyManagerImpl.java
##########
@@ -2209,14 +2205,18 @@ private void listStatusFindKeyInTableCache(
bucketName);
}
+ List<OmKeyInfo> keyInfoList = new ArrayList<>(fileStatusList.size());
for (OzoneFileStatus fileStatus : fileStatusList) {
- if (args.getRefreshPipeline()) {
- refreshPipeline(fileStatus.getKeyInfo());
- }
- if (args.getSortDatanodes()) {
+ keyInfoList.add(fileStatus.getKeyInfo());
+ }
+ refreshPipeline(keyInfoList);
+
+ if (args.getSortDatanodes()) {
+ for (OzoneFileStatus fileStatus : fileStatusList) {
sortDatanodeInPipeline(fileStatus.getKeyInfo(), clientAddress);
Review comment:
Thanks for highlighting this further possible improvement. I'll file a
separate Jira issue for this, as I think it's out of scope here.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]