OpenSearch/plugin/core
Tanguy Leroux 15ab4af157 [Monitoring] Align indices/index stats with local cluster state (elastic/x-pack-elasticsearch#4079)
A small bug in the `IndexStatsCollector` can potentially returns
statistics for newly created indices that does not exist yet in the
collector's `ClusterState` local instance.

It happens because an instance of the current `ClusterState` is
captured and passed to all the collectors before they are executed (so
that they all share the same view of the state of the cluster). On
some clusters, if an index is created after the `ClusterState` is
captured but before the `IndicesStatsRequest` is executed then it can
appears in the index stats but have no corresponding entry in the
local cluster state.

This commit changes the IndexStatsCollector so that it only return
statistics for indices that already exist in the cluster state. This
way a consistent view is possible between indices/index/shard stats.

Original commit: elastic/x-pack-elasticsearch@da173ae0b0
2018-03-12 10:32:54 +01:00
..
licenses Build: Fix third party audit task for xpack core (elastic/x-pack-elasticsearch#3656) 2018-01-22 22:58:34 -08:00
src [Monitoring] Align indices/index stats with local cluster state (elastic/x-pack-elasticsearch#4079) 2018-03-12 10:32:54 +01:00
build.gradle Build: Replace provided configuration with compileOnly (elastic/x-pack-elasticsearch#3868) 2018-02-09 11:30:43 -08:00