remove nocommits; fix test case

This commit is contained in:
Michael McCandless 2016-01-06 03:41:23 -05:00 committed by mikemccand
parent 1d46a00d43
commit 5f4afe842c
2 changed files with 7 additions and 2 deletions

View File

@ -555,7 +555,6 @@ public class IndexShard extends AbstractIndexShardComponent {
refreshMetric.inc(System.nanoTime() - time);
} finally {
logger.debug("remove [{}] writing bytes for shard [{}]", new ByteSizeValue(bytes), shardId());
// nocommit but we don't promptly stop index throttling anymore?
writingBytes.addAndGet(-bytes);
}
} else {
@ -1280,7 +1279,6 @@ public class IndexShard extends AbstractIndexShardComponent {
try {
engine.writeIndexingBuffer();
} finally {
// nocommit but we don't promptly stop index throttling anymore?
writingBytes.addAndGet(-bytes);
logger.debug("remove [{}] writing bytes for shard [{}]", new ByteSizeValue(bytes), shardId());
}

View File

@ -331,6 +331,13 @@ public class IndexingMemoryControllerTests extends ESSingleNodeTestCase {
protected long getIndexBufferRAMBytesUsed(IndexShard shard) {
return shard.getIndexBufferRAMBytesUsed();
}
@Override
protected void writeIndexingBufferAsync(IndexShard shard) {
// just do it sync'd for this test
shard.writeIndexingBuffer();
}
};
for (int i = 0; i < 100; i++) {