mirror of
https://github.com/honeymoose/OpenSearch.git
synced 2025-02-25 22:36:20 +00:00
Core: don't close/reopen IndexWriter when changing RAM buffer size
Today we close/reopen IW when we change the RAM buffer but that's costly because it means the next NRT reader is a full reopen. The RAM buffer size setting is a live one in IndexWriter, even if there are no buffered docs in RAM when you call it. Separately it would be nice if Lucene let you manage a "reader pool" that could outlive individual IW instances ... Closes #6856
This commit is contained in:
parent
557b634f4a
commit
4194ab31c8
@ -234,7 +234,7 @@ public class InternalEngine extends AbstractIndexShardComponent implements Engin
|
||||
if (indexingBufferSize == Engine.INACTIVE_SHARD_INDEXING_BUFFER && preValue != Engine.INACTIVE_SHARD_INDEXING_BUFFER) {
|
||||
logger.debug("updating index_buffer_size from [{}] to (inactive) [{}]", preValue, indexingBufferSize);
|
||||
try {
|
||||
flush(new Flush().type(Flush.Type.NEW_WRITER));
|
||||
flush(new Flush().type(Flush.Type.COMMIT));
|
||||
} catch (EngineClosedException e) {
|
||||
// ignore
|
||||
} catch (FlushNotAllowedEngineException e) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user