Skip to content

Commit a98d99e

Browse files
merge telemetry metrics don't exist in 9.0
1 parent c0da9b4 commit a98d99e

File tree

1 file changed

+0
-24
lines changed

1 file changed

+0
-24
lines changed

server/src/internalClusterTest/java/org/elasticsearch/index/engine/MergeWithLowDiskSpaceIT.java

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -22,15 +22,12 @@
2222
import org.elasticsearch.common.util.concurrent.EsExecutors;
2323
import org.elasticsearch.index.IndexNotFoundException;
2424
import org.elasticsearch.indices.IndicesService;
25-
import org.elasticsearch.plugins.Plugin;
2625
import org.elasticsearch.plugins.PluginsService;
2726
import org.elasticsearch.telemetry.TestTelemetryPlugin;
2827
import org.elasticsearch.test.ESIntegTestCase;
2928
import org.elasticsearch.threadpool.ThreadPool;
3029
import org.junit.BeforeClass;
3130

32-
import java.util.ArrayList;
33-
import java.util.Collection;
3431
import java.util.List;
3532
import java.util.Locale;
3633
import java.util.stream.IntStream;
@@ -53,13 +50,6 @@ public static void setAvailableDiskSpaceBufferLimit() {
5350
MERGE_DISK_HIGH_WATERMARK_BYTES = randomLongBetween(10_000_000L, 20_000_000L);
5451
}
5552

56-
@Override
57-
protected Collection<Class<? extends Plugin>> nodePlugins() {
58-
List<Class<? extends Plugin>> nodePluginsList = new ArrayList<>(super.nodePlugins());
59-
nodePluginsList.add(TestTelemetryPlugin.class);
60-
return nodePluginsList;
61-
}
62-
6353
@Override
6454
protected Settings nodeSettings(int nodeOrdinal, Settings otherSettings) {
6555
return Settings.builder()
@@ -217,17 +207,6 @@ public void testForceMergeIsBlockedThenUnblocked() throws Exception {
217207
// merge executor says merging is blocked due to insufficient disk space while there is a single merge task enqueued
218208
assertThat(threadPoolMergeExecutorService.getMergeTasksQueueLength(), equalTo(1));
219209
assertTrue(threadPoolMergeExecutorService.isMergingBlockedDueToInsufficientDiskSpace());
220-
// telemetry says that there are indeed some segments enqueued to be merged
221-
testTelemetryPlugin.collect();
222-
assertThat(
223-
testTelemetryPlugin.getLongGaugeMeasurement(MergeMetrics.MERGE_SEGMENTS_QUEUED_USAGE).getLast().getLong(),
224-
greaterThan(0L)
225-
);
226-
// but still no merges are currently running
227-
assertThat(
228-
testTelemetryPlugin.getLongGaugeMeasurement(MergeMetrics.MERGE_SEGMENTS_RUNNING_USAGE).getLast().getLong(),
229-
equalTo(0L)
230-
);
231210
// indices stats also says that no merge is currently running (blocked merges are NOT considered as "running")
232211
IndicesStatsResponse indicesStatsResponse = client().admin().indices().prepareStats(indexName).setMerge(true).get();
233212
long currentMergeCount = indicesStatsResponse.getIndices().get(indexName).getPrimaries().merge.getCurrent();
@@ -253,12 +232,9 @@ public void testForceMergeIsBlockedThenUnblocked() throws Exception {
253232
// assert index stats and telemetry report no merging in progress (after force merge returned)
254233
long currentMergeCount = indicesStatsResponse.getIndices().get(indexName).getPrimaries().merge.getCurrent();
255234
assertThat(currentMergeCount, equalTo(0L));
256-
assertThat(testTelemetryPlugin.getLongGaugeMeasurement(MergeMetrics.MERGE_SEGMENTS_QUEUED_USAGE).getLast().getLong(), equalTo(0L));
257-
assertThat(testTelemetryPlugin.getLongGaugeMeasurement(MergeMetrics.MERGE_SEGMENTS_RUNNING_USAGE).getLast().getLong(), equalTo(0L));
258235
// but some merging took place (there might have been other merges automatically triggered before the force merge call)
259236
long totalMergeCount = indicesStatsResponse.getIndices().get(indexName).getPrimaries().merge.getTotal();
260237
assertThat(totalMergeCount, greaterThan(0L));
261-
assertThat(testTelemetryPlugin.getLongCounterMeasurement(MergeMetrics.MERGE_DOCS_TOTAL).getLast().getLong(), greaterThan(0L));
262238
// assert there's a single segment after the force merge
263239
List<ShardSegments> shardSegments = getShardSegments(indexName);
264240
assertThat(shardSegments.size(), equalTo(1));

0 commit comments

Comments
 (0)