-
Notifications
You must be signed in to change notification settings - Fork 25.6k
Closed
Labels
:Core/Infra/CoreCore issues without another labelCore issues without another label>enhancementTeam:Core/InfraMeta label for core/infra teamMeta label for core/infra team
Description
Metadata$Builder#build is called on every node in every cluster state update that changes the cluster metadata. In a busy cluster with many shards, this means it's on a fairly hot path. Profiling cluster state updates in such a cluster indicates that this method spends about 23% of its time calling Setting#get:
The only such call is this one:
elasticsearch/server/src/main/java/org/elasticsearch/cluster/metadata/Metadata.java
Line 1436 in 411d7e7
| final boolean visible = IndexMetadata.INDEX_HIDDEN_SETTING.get(indexMetadata.getSettings()) == false; |
Frequently-accessed settings in IndexMetadata are generally made into fields to avoid having to do the lookup work on each access. We can make a substantial time saving in this method by moving the index.hidden setting to a field.
Metadata
Metadata
Assignees
Labels
:Core/Infra/CoreCore issues without another labelCore issues without another label>enhancementTeam:Core/InfraMeta label for core/infra teamMeta label for core/infra team
