InternalEngine - back to set dirty=false just *before* a refresh is done

reverting: 5553c383bc
This commit is contained in:
Boaz Leskes 2014-03-31 20:57:58 +02:00
parent c7b1f9946f
commit 62b850f52d
1 changed files with 4 additions and 1 deletions

View File

@ -706,9 +706,12 @@ public class InternalEngine extends AbstractIndexShardComponent implements Engin
// but, we want to make sure not to loose ant refresh calls, if one is taking time
synchronized (refreshMutex) {
if (dirty || refresh.force()) {
// we set dirty to false, even though the refresh hasn't happened yet
// as the refresh only holds for data indexed before it. Any data indexed during
// the refresh will not be part of it and will set the dirty flag back to true
dirty = false;
boolean refreshed = searcherManager.maybeRefresh();
assert refreshed : "failed to refresh even though refreshMutex was acquired";
dirty = false;
}
}
} catch (AlreadyClosedException e) {