Skip to content

Commit 12cb6dc

Browse files
committed
Fix testFlushOnInactive (#52275)
We need to reduce the translog sync interval for indices with translog async setting so that we can have the safe commit in the assertBusy interval. This is needed since #51905, where we use the local checkpoint of the safe commit to calculate the number of uncommitted operations of a translog stats. Closes #52251 Relates #51905
1 parent 5bcc6fc commit 12cb6dc

File tree

1 file changed

+1
-0
lines changed
  • server/src/test/java/org/elasticsearch/indices/flush

1 file changed

+1
-0
lines changed

server/src/test/java/org/elasticsearch/indices/flush/FlushIT.java

+1
Original file line numberDiff line numberDiff line change
@@ -389,6 +389,7 @@ public void testFlushOnInactive() throws Exception {
389389
.put(IndexingMemoryController.SHARD_INACTIVE_TIME_SETTING.getKey(), randomTimeValue(10, 1000, "ms")).build());
390390
assertAcked(client().admin().indices().prepareCreate(indexName).setSettings(Settings.builder()
391391
.put(IndexMetaData.SETTING_NUMBER_OF_SHARDS, 1).put(IndexMetaData.SETTING_NUMBER_OF_REPLICAS, 1)
392+
.put(IndexSettings.INDEX_TRANSLOG_SYNC_INTERVAL_SETTING.getKey(), randomTimeValue(200, 500, "ms"))
392393
.put(IndexService.GLOBAL_CHECKPOINT_SYNC_INTERVAL_SETTING.getKey(), randomTimeValue(50, 200, "ms"))
393394
.put("index.routing.allocation.include._name", String.join(",", dataNodes))
394395
.build()));

0 commit comments

Comments
 (0)