Skip to content

Replace ClusterInfo#dataPath key#90515

Merged
idegtiarenko merged 2 commits intoelastic:mainfrom
idegtiarenko:cluster_info_data_path_key
Oct 4, 2022
Merged

Replace ClusterInfo#dataPath key#90515
idegtiarenko merged 2 commits intoelastic:mainfrom
idegtiarenko:cluster_info_data_path_key

Conversation

@idegtiarenko
Copy link
Copy Markdown
Contributor

Replace ClusterInfo#dataPath ShardRouting key with a smaller one that only have a necessary information. Previously dataPath could not be found in case if any shard info changes before ClusterInfo is refreshed

Closes: #90109

Replace ClusterInfo#dataPath ShardRouting key with a smaller one that only have
a necessary information. Previously dataPath could not be found in case if any
shard info changes before ClusterInfo is refreshed
@@ -65,14 +67,14 @@ public ClusterInfo(
Map<String, DiskUsage> mostAvailableSpaceUsage,
Map<String, Long> shardSizes,
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I wonder if it is worth to also replace this map key with a record instead of relying on ClusterInfo#shardIdentifierFromRouting(ShardRouting shardRouting)

@idegtiarenko idegtiarenko added :Distributed/Allocation All issues relating to the decision making around placing a shard (both master logic & on the nodes) >refactoring Team:Distributed Meta label for distributed team. labels Sep 29, 2022
@idegtiarenko idegtiarenko marked this pull request as ready for review September 29, 2022 12:56
@elasticsearchmachine
Copy link
Copy Markdown
Collaborator

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

Copy link
Copy Markdown
Member

@DaveCTurner DaveCTurner left a comment

Choose a reason for hiding this comment

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

LGTM

@idegtiarenko idegtiarenko merged commit 89370d1 into elastic:main Oct 4, 2022
@idegtiarenko idegtiarenko deleted the cluster_info_data_path_key branch October 4, 2022 09:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

:Distributed/Allocation All issues relating to the decision making around placing a shard (both master logic & on the nodes) >refactoring Team:Distributed Meta label for distributed team. v8.6.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

org.elasticsearch.cluster.ClusterInfo#routingToDataPath should not use ShardRouting as a key

3 participants