LZD-PratyushBhatt opened a new issue, #3028: URL: https://github.com/apache/helix/issues/3028
Currently, getZoneBasedInstances() internally uses a TreeSet, which leads to lexicographical sorting of instances during the stoppable check. This behavior results in the output instance order being different from the input list, even when multiple instances are equally stoppable. This issue proposes to make the ordering deterministic based on user input, by introducing a new boolean parameter preserveOrder to getZoneBasedInstances() and relevant REST API changes. When preserveOrder is set to true, the original order of the input list will be preserved. Default behavior (preserveOrder = false) will maintain backward compatibility for OSS users who may rely on the current output order. This change aims to improve predictability in testing and usage scenarios where instance order matters. We'll ensure this behavior is clearly documented to avoid incorrect assumptions. -- 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]
