You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@solr.apache.org by "Michael Gibney (Jira)" <ji...@apache.org> on 2022/02/17 03:18:00 UTC

[jira] [Commented] (SOLR-16017) Allow first registered SolrIndexSearcher to inform its configured caches

    [ https://issues.apache.org/jira/browse/SOLR-16017?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17493625#comment-17493625 ] 

Michael Gibney commented on SOLR-16017:
---------------------------------------

[PR #646|https://github.com/apache/solr/pull/646] introduces a simple patch for this. The patch currently doesn't introduce anything that actually _uses_ the new hook. I have my eye on SOLR-1308 (or something like it), but with this change making the communication between SolrIndexSearcher and SolrCache more consistent, I believe no other changes would need to be made to current code.

> Allow first registered SolrIndexSearcher to inform its configured caches
> ------------------------------------------------------------------------
>
>                 Key: SOLR-16017
>                 URL: https://issues.apache.org/jira/browse/SOLR-16017
>             Project: Solr
>          Issue Type: Improvement
>      Security Level: Public(Default Security Level. Issues are Public) 
>          Components: search
>    Affects Versions: main (10.0)
>            Reporter: Michael Gibney
>            Priority: Trivial
>          Time Spent: 10m
>  Remaining Estimate: 0h
>
> Each configured cache is currently informed of its associated SolrIndexSearcher when SolrCore calls the {{SolrIndexSearcher.warm(...)}}, which in turn calls {{SolrCache.warm(...)}}, passing the searcher as an argument.
> It is inconsistent that caches are informed of subsequent searchers, but not of the first registered searcher. A note on [SolrCache.warm|https://github.com/apache/solr/blob/9903d00b0fb6216f836bb580f42d0081b7b41584/solr/core/src/java/org/apache/solr/search/SolrCache.java#L144-L150] suggests the possibility of providing the SolrIndexSearcher on cache.init(...). That seems reasonable to me, and would be one way to resolve the current inconsistency. But that would likely constitute a major change, perhaps involving a change in the SolrCache plugin API, and the responsibility of each cache to maintain its own reference to its associated searcher.
> Another way to resolve the current inconsistency would be to introduce a method to (analogous to {{warm(...)}}) that the first registered SolrIndexSearcher could use to inform its caches.



--
This message was sent by Atlassian Jira
(v8.20.1#820001)

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