Skip to content

Commit c90a4f6

Browse files
albertzaharovitsprdoylerjernst
authored
[8.19] Fix MergeWithLowDiskSpaceIT testRelocationWhileForceMerging (#132913)
* There must be at least one merge task blocked (#132496) After triggering a force merge, there might still be other merge tasks running concurrently, so it is incorrect to assert a single merge is blocked in the test. Fix #131789 Co-authored-by: Patrick Doyle <[email protected]> * Use consistent terminology for transport version resources/references (#132882) (#132898) The build system for transport versions operate on two different types of projects. A project can have named references to transport versions, and it could also be the source of truth for transport version resources, where latest and definitions files exist. This commit renames the plugins and tasks to consistently use that terminology. --------- Co-authored-by: Patrick Doyle <[email protected]> Co-authored-by: Ryan Ernst <[email protected]>
1 parent 231656b commit c90a4f6

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

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

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -179,6 +179,7 @@ public void testForceMergeIsBlockedThenUnblocked() throws Exception {
179179
indexName,
180180
Settings.builder().put(IndexMetadata.SETTING_NUMBER_OF_REPLICAS, 0).put(IndexMetadata.SETTING_NUMBER_OF_SHARDS, 1).build()
181181
);
182+
ensureGreen(indexName);
182183
// get current disk space usage (for all indices on the node)
183184
IndicesStatsResponse stats = indicesAdmin().prepareStats().clear().setStore(true).get();
184185
long usedDiskSpaceAfterIndexing = stats.getTotal().getStore().sizeInBytes();
@@ -254,6 +255,7 @@ public void testRelocationWhileForceMerging() throws Exception {
254255
indexName,
255256
Settings.builder().put(IndexMetadata.SETTING_NUMBER_OF_REPLICAS, 0).put(IndexMetadata.SETTING_NUMBER_OF_SHARDS, 1).build()
256257
);
258+
ensureGreen(indexName);
257259
// get current disk space usage (for all indices on the node)
258260
IndicesStatsResponse stats = indicesAdmin().prepareStats().clear().setStore(true).get();
259261
long usedDiskSpaceAfterIndexing = stats.getTotal().getStore().sizeInBytes();
@@ -287,8 +289,8 @@ public void testRelocationWhileForceMerging() throws Exception {
287289
ThreadPoolMergeExecutorService threadPoolMergeExecutorService = internalCluster().getInstance(IndicesService.class, node1)
288290
.getThreadPoolMergeExecutorService();
289291
assertBusy(() -> {
290-
// merge executor says merging is blocked due to insufficient disk space while there is a single merge task enqueued
291-
assertThat(threadPoolMergeExecutorService.getMergeTasksQueueLength(), equalTo(1));
292+
// merge executor says merging is blocked due to insufficient disk space
293+
assertThat(threadPoolMergeExecutorService.getMergeTasksQueueLength(), greaterThan(0));
292294
assertTrue(threadPoolMergeExecutorService.isMergingBlockedDueToInsufficientDiskSpace());
293295
// indices stats also says that no merge is currently running (blocked merges are NOT considered as "running")
294296
IndicesStatsResponse indicesStatsResponse = client().admin().indices().prepareStats(indexName).setMerge(true).get();

0 commit comments

Comments
 (0)