mirror of
https://github.com/honeymoose/OpenSearch.git
synced 2025-02-26 06:46:10 +00:00
Fire off another maybeFlush on finish to ensure we don't miss a pending flush
This commit is contained in:
parent
1fd8c64f1f
commit
6cbf2de592
@ -1521,6 +1521,7 @@ public class IndexShard extends AbstractIndexShardComponent {
|
||||
@Override
|
||||
public void onAfter() {
|
||||
asyncFlushRunning.compareAndSet(true, false);
|
||||
maybeFlush(); // fire a flush up again if we have filled up the limits such that shouldFlush() returns true
|
||||
}
|
||||
};
|
||||
threadPool.executor(ThreadPool.Names.FLUSH).execute(abstractRunnable);
|
||||
@ -1530,5 +1531,4 @@ public class IndexShard extends AbstractIndexShardComponent {
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -690,7 +690,6 @@ public class IndexShardTests extends ESSingleNodeTestCase {
|
||||
assertTrue(postIndexWithExceptionCalled.get());
|
||||
}
|
||||
|
||||
|
||||
public void testMaybeFlush() throws Exception {
|
||||
createIndex("test", settingsBuilder().put(TranslogConfig.INDEX_TRANSLOG_DURABILITY, Translog.Durabilty.REQUEST).build());
|
||||
ensureGreen();
|
||||
|
Loading…
x
Reference in New Issue
Block a user