[
https://issues.apache.org/jira/browse/HDFS-17059?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17736962#comment-17736962
]
ASF GitHub Bot commented on HDFS-17059:
---------------------------------------
hfutatzhanghb commented on PR #5777:
URL: https://github.com/apache/hadoop/pull/5777#issuecomment-1606509566
> The `for each` statement in java will be translate to the form of iterator
from the beginning. See [java doc The enhanced for
statement](https://docs.oracle.com/javase/specs/jls/se8/html/jls-14.html#jls-14.14.2).
So it seems that `pickupReplicaSet` only be called once.
Hi, @zhangshuyan0. Thanks a lot for your reviewing and reminding this case.
Learned a lot from it. Thanks again~ I will close this PR.
> Optimize chooseReplicaToDelete method to prevent from calling
> pickupReplicaSet repeatedly
> -----------------------------------------------------------------------------------------
>
> Key: HDFS-17059
> URL: https://issues.apache.org/jira/browse/HDFS-17059
> Project: Hadoop HDFS
> Issue Type: Improvement
> Reporter: farmmamba
> Assignee: farmmamba
> Priority: Trivial
> Labels: pull-request-available
>
> We should optimize chooseReplicaToDelete method to prevent from calling
> pickupReplicaSet repeatedly, just like HDFS-17053.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]