fix possible concurrency bug in IMC when indexing threads are faster in writing bytes than the status checker is in checking all shards

This commit is contained in:
Michael McCandless 2016-01-12 14:40:47 -05:00 committed by mikemccand
parent cde5bb88b1
commit ce32b959fd
1 changed files with 2 additions and 0 deletions

View File

@ -256,6 +256,8 @@ public class IndexingMemoryController extends AbstractComponent implements Index
} finally { } finally {
runLock.unlock(); runLock.unlock();
} }
// Could be while we were checking, more bytes arrived:
totalBytes = bytesWrittenSinceCheck.addAndGet(bytes);
} else { } else {
break; break;
} }