From c5971272ee71a24f17e4958d729588c59266ab05 Mon Sep 17 00:00:00 2001 From: Michael McCandless Date: Tue, 6 Oct 2015 03:59:37 -0400 Subject: [PATCH] fold feedback --- .../java/org/elasticsearch/index/shard/IndexShard.java | 5 ++++- .../indices/memory/IndexingMemoryController.java | 7 +++---- .../indices/memory/IndexingMemoryControllerTests.java | 2 +- 3 files changed, 8 insertions(+), 6 deletions(-) diff --git a/core/src/main/java/org/elasticsearch/index/shard/IndexShard.java b/core/src/main/java/org/elasticsearch/index/shard/IndexShard.java index 06bb2a731c9..645b970cb66 100644 --- a/core/src/main/java/org/elasticsearch/index/shard/IndexShard.java +++ b/core/src/main/java/org/elasticsearch/index/shard/IndexShard.java @@ -999,7 +999,8 @@ public class IndexShard extends AbstractIndexShardComponent implements IndexSett this.failedEngineListener.delegates.add(failedEngineListener); } - /** Returns true if the indexing buffer size did change */ + /** Change the indexing and translog buffer sizes. If {@code IndexWriter} is currently using more than + * the new buffering indexing size then we do a refresh to free up the heap. */ public void updateBufferSize(ByteSizeValue shardIndexingBufferSize, ByteSizeValue shardTranslogBufferSize) { final EngineConfig config = engineConfig; @@ -1046,6 +1047,8 @@ public class IndexShard extends AbstractIndexShardComponent implements IndexSett } } + /** Returns {@code true} if this shard is active (has seen indexing ops in the last {@link + * IndexingMemoryController#SHARD_INACTIVE_TIME_SETTING} (default 5 minutes), else {@code false}. */ public boolean getActive() { return active.get(); } diff --git a/core/src/main/java/org/elasticsearch/indices/memory/IndexingMemoryController.java b/core/src/main/java/org/elasticsearch/indices/memory/IndexingMemoryController.java index 9231f9a779e..12c124297de 100644 --- a/core/src/main/java/org/elasticsearch/indices/memory/IndexingMemoryController.java +++ b/core/src/main/java/org/elasticsearch/indices/memory/IndexingMemoryController.java @@ -161,7 +161,6 @@ public class IndexingMemoryController extends AbstractLifecycleComponent= inactiveTimeNS; }