dsmiley commented on a change in pull request #580:
URL: https://github.com/apache/solr/pull/580#discussion_r797962588
##########
File path:
solr/core/src/java/org/apache/solr/core/TransientSolrCoreCacheDefault.java
##########
@@ -89,6 +86,25 @@ public TransientSolrCoreCacheDefault(CoreContainer
coreContainer) {
transientDescriptors = new LinkedHashMap<>(initialCapacity);
}
+ private void onEvict(SolrCore core) {
+ if (coreContainer.hasPendingCoreOps(core.getName())) {
+ if (log.isInfoEnabled()) {
+ log.info("NOT evicting transient core [{}]; it's loading or something
else", core.getName());
+ }
+ transientCores.put(core.getName(), core); // put back
Review comment:
In a race scenario with the removalListener: getCore will call `core =
solrCores.waitAddPendingCoreOps(name);` which will return the core that was put
back (un-evicted). It will see it and return it without creating a new one. I
don't think there will be errors.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]