You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the solution you'd like
Revisit WeightedRoutingCache and see if we can make it more optimal. Currently the cache is invalidated on every cluster state change which is not needed and can affect performance.
Check if we can leverage AttributeRoutings which is invalidated only on change in shard routing.
static class AttributesRoutings {
public final List<ShardRouting> withSameAttribute;
public final List<ShardRouting> withoutSameAttribute;
public final int totalSize;
AttributesRoutings(List<ShardRouting> withSameAttribute, List<ShardRouting> withoutSameAttribute) {
this.withSameAttribute = withSameAttribute;
this.withoutSameAttribute = withoutSameAttribute;
this.totalSize = withoutSameAttribute.size() + withSameAttribute.size();
}
}
Make WeightedRoutingCache more performant.
The text was updated successfully, but these errors were encountered:
Describe the solution you'd like
Revisit
WeightedRoutingCache
and see if we can make it more optimal. Currently the cache is invalidated on every cluster state change which is not needed and can affect performance.AttributeRoutings
which is invalidated only on change in shard routing.WeightedRoutingCache
more performant.The text was updated successfully, but these errors were encountered: