SOLR-3620: put back cancel recovery in close - it should be fine now

git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1361568 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Mark Robert Miller 2012-07-14 17:29:34 +00:00
parent 9875dc69fb
commit 902ed6cdf6
1 changed files with 6 additions and 5 deletions

View File

@ -63,7 +63,7 @@ public final class DefaultSolrCoreState extends SolrCoreState {
}
@Override
public void decref(IndexWriterCloser closer) {
public void decref(IndexWriterCloser closer) {
synchronized (this) {
refCnt--;
if (refCnt == 0) {
@ -81,10 +81,11 @@ public final class DefaultSolrCoreState extends SolrCoreState {
} catch (Throwable t) {
log.error("Error during shutdown of directory factory.", t);
}
// TODO: we cannot cancel recovery here if its a CoreContainer shutdown
// it can cause deadlock - but perhaps we want to if we are stopping early
// and CoreContainer is not being shutdown?
try {
cancelRecovery();
} catch (Throwable t) {
log.error("Error cancelling recovery", t);
}
closed = true;
}