TEST: Avoid deletion in FlushIT

Due to the recent change in LUCENE-8263, a merge can be triggered if the
deletion ration is higher than 33%. An in-progress merge can prevent a
synced-flush from issuing.

This commit avoids deletes by using different docIds.

Closes #32436
This commit is contained in:
Nhat Nguyen 2018-07-27 23:14:24 -04:00
parent 139631c77d
commit 6e98615cc1
1 changed files with 1 additions and 2 deletions

View File

@ -286,7 +286,6 @@ public class FlushIT extends ESIntegTestCase {
assertThat(fullResult.successfulShards(), equalTo(numberOfReplicas + 1)); assertThat(fullResult.successfulShards(), equalTo(numberOfReplicas + 1));
} }
@AwaitsFix(bugUrl = "https://github.com/elastic/elasticsearch/issues/32436")
public void testDoNotRenewSyncedFlushWhenAllSealed() throws Exception { public void testDoNotRenewSyncedFlushWhenAllSealed() throws Exception {
internalCluster().ensureAtLeastNumDataNodes(between(2, 3)); internalCluster().ensureAtLeastNumDataNodes(between(2, 3));
final int numberOfReplicas = internalCluster().numDataNodes() - 1; final int numberOfReplicas = internalCluster().numDataNodes() - 1;
@ -311,7 +310,7 @@ public class FlushIT extends ESIntegTestCase {
// Shards were updated, renew synced flush. // Shards were updated, renew synced flush.
final int moreDocs = between(1, 10); final int moreDocs = between(1, 10);
for (int i = 0; i < moreDocs; i++) { for (int i = 0; i < moreDocs; i++) {
index("test", "doc", Integer.toString(i)); index("test", "doc", "more-" + i);
} }
final ShardsSyncedFlushResult thirdSeal = SyncedFlushUtil.attemptSyncedFlush(logger, internalCluster(), shardId); final ShardsSyncedFlushResult thirdSeal = SyncedFlushUtil.attemptSyncedFlush(logger, internalCluster(), shardId);
assertThat(thirdSeal.successfulShards(), equalTo(numberOfReplicas + 1)); assertThat(thirdSeal.successfulShards(), equalTo(numberOfReplicas + 1));