sodonnel opened a new pull request, #4767:
URL: https://github.com/apache/ozone/pull/4767

   ## What changes were proposed in this pull request?
   
   When iterating over the pipeline list, if a pipeline is not valid for 
selection, we call Array.remove(element) to remove it from the list before 
selecting another random element.
   
   If the pipeline selection policy could return the array index of the 
selected pipeline rather than the actual pipeline, then we can use the more 
efficient Array.remove(index). Even this is still O(n) as the array has to 
shuffle the elements down the internal array, but it is better than 
Array.remove(element) as it avoids searching for the element.
   
   ## What is the link to the Apache JIRA
   
   https://issues.apache.org/jira/browse/HDDS-8682
   
   ## How was this patch tested?
   
   Existing tests should cover this.


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