StateVersionTracker { int getLowestObservedDistributionBits() { return lowestObservedDistributionBits; } StateVersionTracker(double minMergeCompletionRatio); ClusterState getVersionedClusterState(); ClusterStatsAggregator getAggregatedClusterStats(); ClusterStateBundle getVersionedClusterStateBundle(); void updateLatestCandidateStateBundle(final ClusterStateBundle candidateBundle); AnnotatedClusterState getLatestCandidateState(); List<ClusterStateHistoryEntry> getClusterStateHistory();  }
@Test public void lowest_observed_distribution_bit_is_initially_16() { final StateVersionTracker versionTracker = createWithMockedMetrics(); assertThat(versionTracker.getLowestObservedDistributionBits(), equalTo(16)); }
@Test public void lowest_observed_distribution_bit_is_tracked_across_states() { final StateVersionTracker versionTracker = createWithMockedMetrics(); updateAndPromote(versionTracker, stateWithoutAnnotations("bits:15 distributor:2 storage:2"), 100); assertThat(versionTracker.getLowestObservedDistributionBits(), equalTo(15)); updateAndPromote(versionTracker, stateWithoutAnnotations("bits:17 distributor:2 storage:2"), 200); assertThat(versionTracker.getLowestObservedDistributionBits(), equalTo(15)); updateAndPromote(versionTracker, stateWithoutAnnotations("bits:14 distributor:2 storage:2"), 300); assertThat(versionTracker.getLowestObservedDistributionBits(), equalTo(14)); }