mirror of https://github.com/apache/lucene.git
SOLR-12412: release IndexWriter after getting tragic exception
This commit is contained in:
parent
ad01baedbf
commit
cd08c7ef13
|
@ -197,6 +197,10 @@ public abstract class SolrCoreState {
|
|||
public Throwable getTragicException() throws IOException {
|
||||
RefCounted<IndexWriter> ref = getIndexWriter(null);
|
||||
if (ref == null) return null;
|
||||
return ref.get().getTragicException();
|
||||
try {
|
||||
return ref.get().getTragicException();
|
||||
} finally {
|
||||
ref.decref();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue