Skip to content

Conversation

@rjernst
Copy link
Member

@rjernst rjernst commented May 3, 2022

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

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
@rjernst rjernst added :Distributed Indexing/Distributed A catch all label for anything in the Distributed Indexing Area. Please avoid if you can. >refactoring v8.3.0 labels May 3, 2022
@rjernst rjernst requested a review from original-brownbear May 3, 2022 00:04
@elasticmachine elasticmachine added the Team:Distributed (Obsolete) Meta label for distributed team (obsolete). Replaced by Distributed Indexing/Coordination. label May 3, 2022
@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-distributed (Team:Distributed)

Copy link
Contributor

@original-brownbear original-brownbear left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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?

Copy link
Contributor

@original-brownbear original-brownbear left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was gonna benchmark this ... but looking at it again, just LGTM this code is slow elsewhere :)

@rjernst rjernst merged commit 3e02748 into elastic:master May 3, 2022
@rjernst rjernst deleted the hppc/routing_table branch May 3, 2022 15:32
@rjernst rjernst mentioned this pull request May 3, 2022
35 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

:Distributed Indexing/Distributed A catch all label for anything in the Distributed Indexing Area. Please avoid if you can. >refactoring Team:Distributed (Obsolete) Meta label for distributed team (obsolete). Replaced by Distributed Indexing/Coordination. v8.3.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants