Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Review in the form of pull request #1

Conversation

joegallo
Copy link

@joegallo joegallo commented Sep 21, 2021

Related to elastic#78075

👋 @original-brownbear.

re: 5adcf14: the set declaration and initialization looked a bit funky to me, this is my attempt to make that a little more readable.

re: dfebb2a: Strings.tokenizeToStringArray does a healthy number of allocations, but we can shortcut it in the null/empty String case -- I was originally tempted to add a separate early return from allocationAllowed that checked Strings.hasLength(tierSetting) directly, but I thought this would capture more or less the same shortcut while keeping the code pretty clear.

re: ea03188: If we're allocating a HashSet, we might as well go all the way and use containsAll -- what do you think?

This is very much "hmmmm, what do you think about this?" -- we can take all, some, or none of these commits.

@joegallo
Copy link
Author

:merged:

@joegallo joegallo closed this Sep 21, 2021
@joegallo joegallo deleted the speed-up-data-tier-allocation-decider branch September 22, 2021 02:53
original-brownbear pushed a commit that referenced this pull request Oct 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant