Remove use of ImmutableOpenIntMap in IndexRoutingTable#86368
Merged
rjernst merged 1 commit intoelastic:masterfrom May 3, 2022
Merged
Remove use of ImmutableOpenIntMap in IndexRoutingTable#86368rjernst merged 1 commit intoelastic:masterfrom
rjernst merged 1 commit intoelastic:masterfrom
Conversation
The routing table builder uses an hppc based immutable map to keep track of shard id to shard table. However, when building the final routing table, it is just converted to an array. This commit switches to a HashMap. relates elastic#86239
Collaborator
|
Pinging @elastic/es-distributed (Team:Distributed) |
Contributor
There was a problem hiding this comment.
Phew this is the one place where the performance of the int map matters I think. Ideally, we'd just ditch the use of a map instead of moving to boxed Integer keys. It should be possible to just use an array for shards like we do in other places in the routing table already?
original-brownbear
approved these changes
May 3, 2022
Contributor
original-brownbear
left a comment
There was a problem hiding this comment.
I was gonna benchmark this ... but looking at it again, just LGTM this code is slow elsewhere :)
35 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The routing table builder uses an hppc based immutable map to keep track
of shard id to shard table. However, when building the final routing
table, it is just converted to an array. This commit switches to a
HashMap.
relates #86239