mirror of https://github.com/apache/lucene.git
SOLR-10063: CoreContainer shutdown has race condition that can cause a hang on shutdown.
This commit is contained in:
parent
2196663156
commit
5b976959d9
|
@ -159,6 +159,8 @@ Bug Fixes
|
|||
|
||||
* SOLR-10124: Replication can skip removing a temporary index directory in some cases when it should not. (Mark Miller)
|
||||
|
||||
* SOLR-10063: CoreContainer shutdown has race condition that can cause a hang on shutdown. (Mark Miller)
|
||||
|
||||
Optimizations
|
||||
----------------------
|
||||
|
||||
|
|
|
@ -679,7 +679,16 @@ public class CoreContainer {
|
|||
}
|
||||
if (backgroundCloser != null) { // Doesn't seem right, but tests get in here without initializing the core.
|
||||
try {
|
||||
backgroundCloser.join();
|
||||
while (true) {
|
||||
backgroundCloser.join(15000);
|
||||
if (backgroundCloser.isAlive()) {
|
||||
synchronized (solrCores.getModifyLock()) {
|
||||
solrCores.getModifyLock().notifyAll(); // there is a race we have to protect against
|
||||
}
|
||||
} else {
|
||||
break;
|
||||
}
|
||||
}
|
||||
} catch (InterruptedException e) {
|
||||
Thread.currentThread().interrupt();
|
||||
if (log.isDebugEnabled()) {
|
||||
|
|
Loading…
Reference in New Issue