mirror of
https://github.com/apache/lucene.git
synced 2025-02-28 21:39:25 +00:00
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:
parent
e003b49cab
commit
c33118ce89
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user