set last indexing time before invoking IMC

This commit is contained in:
Michael McCandless 2015-10-03 17:29:01 -04:00 committed by mikemccand
parent 934cc091e6
commit 19ab16b9a5
1 changed files with 1 additions and 1 deletions

View File

@ -930,13 +930,13 @@ public class IndexShard extends AbstractIndexShardComponent implements IndexSett
}
private void ensureWriteAllowed(Engine.Operation op) throws IllegalIndexShardStateException {
lastWriteNS = op.startTime();
if (active.getAndSet(true) == false) {
// We are currently inactive, but a new write operation just showed up, so we now notify IMC
// to wake up and fix our indexing buffer. We could do this async instead, but cost should
// be low, and it's rare this happens.
indexingMemoryController.forceCheck();
}
lastWriteNS = op.startTime();
Engine.Operation.Origin origin = op.origin();
IndexShardState state = this.state; // one time volatile read