Pass IndexMetadata to AllocationDecider.canRemain#88453
Pass IndexMetadata to AllocationDecider.canRemain#88453original-brownbear merged 1 commit intoelastic:masterfrom original-brownbear:lookup-index-metadata-once
Conversation
We need the metadata in a number of allocation deciders and pass it to other allocation methods. Passing it here avoids redundant lookups across deciders.
|
Looks like it might make sense to add this to |
Maybe. If we want it I'd do it in a follow-up though. This one is already quite noisy and doing it in |
DaveCTurner
left a comment
There was a problem hiding this comment.
That is a little surprising - if rebalancing is allowed then every rebalance attempt should call canAllocate on every ⟨index,node⟩ pair. Maybe rebalancing isn't allowed much in these benchmarks?
That said, the balancer uses the canAllocate variant which already accepts an IndexMetadata.
Anyway LGTM.
|
Thanks David!
That's what I would expect yes. |
* upstream/master: Pass IndexMetadata to AllocationDecider.can_remain (elastic#88453) [TSDB] Cache rollup bucket timestamp to reduce rounding cost (elastic#88420) Correct some typos/mistakes in comments/docs (elastic#88446) Make ClusterInfo use immutable maps in all cases (elastic#88447) Reduce map lookups (elastic#88418) Don't index geo_shape field in AbstractBuilderTestCase (elastic#88437) Remove usages of TestGeoShapeFieldMapperPlugin from enrich module (elastic#88440) Fix test memory leak (elastic#88362) Improve error when sorting on incompatible types (elastic#88399) Remove usages of BucketCollector#getLeafCollector(LeafReaderContext) (elastic#88414) Mute ReactiveStorageIT::testScaleWhileShrinking (elastic#88431) Clarify snapshot docs on archive indices (elastic#88417) [Stack Monitoring] Switch cgroup memory fields to keyword (elastic#88260) Fix RealmIdentifier XContent parser (elastic#88410) Make LoggedExec gradle task configuration cache compatible (elastic#87621) Update CorruptedFileIT so that it passes with new allocation strategy (elastic#88314) Update RareClusterStateIT to work with the new shards allocator (elastic#87922) Ensure CreateApiKey always creates a new document (elastic#88413) # Conflicts: # x-pack/plugin/rollup/src/main/java/org/elasticsearch/xpack/rollup/v2/RollupShardIndexer.java
We need the metadata in a number of allocation deciders and pass it to other allocation methods.
Passing it here avoids redundant lookups across deciders.
relates #77466