SOLR-3621: release writer get lock in a finally

git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1362500 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Mark Robert Miller 2012-07-17 14:03:40 +00:00
parent e003b49cab
commit c33118ce89

View File

@ -92,16 +92,18 @@ public final class DefaultSolrCoreState extends SolrCoreState {
wait();
} catch (InterruptedException e) {}
}
if (indexWriter != null) {
indexWriter.close();
try {
if (indexWriter != null) {
indexWriter.close();
}
indexWriter = createMainIndexWriter(core, "DirectUpdateHandler2", false,
true);
// we need to null this so it picks up the new writer next get call
refCntWriter = null;
} finally {
pauseWriter = false;
notifyAll();
}
indexWriter = createMainIndexWriter(core, "DirectUpdateHandler2",
false, true);
// we need to null this so it picks up the new writer next get call
refCntWriter = null;
pauseWriter = false;
notifyAll();
}
@Override