You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@solr.apache.org by GitBox <gi...@apache.org> on 2022/02/02 00:09:06 UTC

[GitHub] [solr] dsmiley commented on a change in pull request #580: SOLR-15964: Transient cores: don't evict open ones

dsmiley commented on a change in pull request #580:
URL: https://github.com/apache/solr/pull/580#discussion_r797171492



##########
File path: solr/core/src/java/org/apache/solr/core/TransientSolrCoreCacheDefault.java
##########
@@ -89,6 +86,21 @@ public TransientSolrCoreCacheDefault(CoreContainer coreContainer) {
     transientDescriptors = new LinkedHashMap<>(initialCapacity);
   }
 
+  private void onEvict(SolrCore core) {
+    if (core.getOpenCount() > 1) {

Review comment:
       From the pinning docs:
   
   > The weight and expiration are evaluated when the entry is written into the cache.
   
   This suggests that if the weight changes, then it needs to be re-put into the cache?  For SolrCores in this cache, I think it would be awkward/entangled to do this.  Basically whenever anyone requests or returns a core, we call this method.  Not much lines-of-code but it's conceptually strange and readers of the code and our future selves will wonder what's going on.
   
   Any way, I think the approach here (put back on eviction) is expected to be rare.  Basically, the least requested item (probably hasn't been requested in a while) is still being used, which suggests some long-running operation on it is underway.  Also I have some logs on this so we can observe if this is happening more often.




-- 
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: issues-unsubscribe@solr.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org
For additional commands, e-mail: issues-help@solr.apache.org