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

Mike Drob commented on SOLR-15762:
----------------------------------

bq. If SolrCache had a isAsync() method, then JoinQuery could interrogate 
SolrIndexSearcher.getFilterCache to check this method and throw. This would 
allow for repeatability and eager/early reporting of the problem. WDYT?

Yes, maybe? Probably not for 8.11 though.

I think the PR as is would be good with minor change around the scope of the 
try/catch (if the tests passed, which they currently don't for me).

> IllegalStateException: Recursive update thrown when executing complex Join 
> queries
> ----------------------------------------------------------------------------------
>
>                 Key: SOLR-15762
>                 URL: https://issues.apache.org/jira/browse/SOLR-15762
>             Project: Solr
>          Issue Type: Bug
>      Security Level: Public(Default Security Level. Issues are Public) 
>          Components: search, Server
>    Affects Versions: main (9.0), 8.10, 8.11, 8.10.1
>            Reporter: Thomas Wöckinger
>            Priority: Major
>              Labels: pull-request-available
>             Fix For: 8.11
>
>         Attachments: ParameterizedJoinQueryTest.java
>
>          Time Spent: 2h
>  Remaining Estimate: 0h
>
> When running complex Join queries (maybe others effected too) an 
> IllegalStateException: Recursive update is thrown because of recursive up of 
> the FastLRUCache triggered by FastLRUCache.computeIfAbsent used by 
> SolrIndexSearcher.
> The issue is caused by changes due to SOLR-15555 by commit 
> [https://github.com/apache/lucene-solr/commit/fd9631f59d03500dbde31f7d7ae23b10d364d80d#diff-99978700f1c69d6a5f6c2190f89c98cfe20c441161db5a183ec002e15cb1be28]
> Following Join Query causes the exception:
> new JsonQueryRequest().setQuery("\{!join from=_id_ to=standorte._id_ v=$q1}")
>  .withParam("q1", "type:standort AND _id_:\{!join from=_id_ 
> to=beziehungen._id_ v=$q2}")
>  .withParam("q2", "type:beziehung AND _id_:\{!join from=_id_ to=person._id_ 
> v='type:person'}")
> The stack trace shows the recusive call:
> 08:29:43,569][ ][Thread:main] ERROR java.lang.IllegalStateException: 
> Recursive update
>  at 
> java.base/java.util.concurrent.ConcurrentHashMap.computeIfAbsent(ConcurrentHashMap.java:1760)
>  at 
> org.apache.solr.util.ConcurrentLRUCache.computeIfAbsent(ConcurrentLRUCache.java:226)
>  at org.apache.solr.search.FastLRUCache.computeIfAbsent(FastLRUCache.java:259)
>  at 
> org.apache.solr.search.SolrIndexSearcher.getDocSet(SolrIndexSearcher.java:1122)
>  at 
> org.apache.solr.search.JoinQuery$JoinQueryWeight.getDocSetEnumerate(JoinQParserPlugin.java:591)
>  at 
> org.apache.solr.search.JoinQuery$JoinQueryWeight.getDocSet(JoinQParserPlugin.java:452)
>  at 
> org.apache.solr.search.JoinQuery$JoinQueryWeight.scorer(JoinQParserPlugin.java:381)
>  at org.apache.lucene.search.Weight.scorerSupplier(Weight.java:148)
>  at 
> org.apache.lucene.search.BooleanWeight.scorerSupplier(BooleanWeight.java:379)
>  at org.apache.lucene.search.BooleanWeight.scorer(BooleanWeight.java:344)
>  at org.apache.lucene.search.Weight.bulkScorer(Weight.java:182)
>  at org.apache.lucene.search.BooleanWeight.bulkScorer(BooleanWeight.java:338)
>  at org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:656)
>  at org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:443)
>  at org.apache.solr.search.DocSetUtil.createDocSetGeneric(DocSetUtil.java:145)
>  at org.apache.solr.search.DocSetUtil.createDocSet(DocSetUtil.java:134)
>  at 
> org.apache.solr.search.SolrIndexSearcher.getDocSetNC(SolrIndexSearcher.java:1197)
>  at 
> org.apache.solr.search.SolrIndexSearcher.lambda$getAndCacheDocSet$1(SolrIndexSearcher.java:876)
>  at 
> org.apache.solr.search.FastLRUCache.lambda$computeIfAbsent$1(FastLRUCache.java:261)
>  at 
> org.apache.solr.util.ConcurrentLRUCache.lambda$computeIfAbsent$1(ConcurrentLRUCache.java:227)
>  at 
> java.base/java.util.concurrent.ConcurrentHashMap.computeIfAbsent(ConcurrentHashMap.java:1705)
>  at 
> org.apache.solr.util.ConcurrentLRUCache.computeIfAbsent(ConcurrentLRUCache.java:226)
>  at org.apache.solr.search.FastLRUCache.computeIfAbsent(FastLRUCache.java:259)
>  at 
> org.apache.solr.search.SolrIndexSearcher.getAndCacheDocSet(SolrIndexSearcher.java:876)
>  at 
> org.apache.solr.search.SolrIndexSearcher.getDocSet(SolrIndexSearcher.java:825)
>  at 
> org.apache.solr.search.JoinQuery$JoinQueryWeight.getDocSetEnumerate(JoinQParserPlugin.java:476)
>  at 
> org.apache.solr.search.JoinQuery$JoinQueryWeight.getDocSet(JoinQParserPlugin.java:452)
>  at 
> org.apache.solr.search.JoinQuery$JoinQueryWeight.scorer(JoinQParserPlugin.java:381)
>  at org.apache.lucene.search.Weight.scorerSupplier(Weight.java:148)
>  at 
> org.apache.lucene.search.BooleanWeight.scorerSupplier(BooleanWeight.java:379)
>  at org.apache.lucene.search.BooleanWeight.scorer(BooleanWeight.java:344)
>  at org.apache.lucene.search.Weight.bulkScorer(Weight.java:182)
>  at org.apache.lucene.search.BooleanWeight.bulkScorer(BooleanWeight.java:338)
>  at org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:656)
>  at org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:443)
>  at org.apache.solr.search.DocSetUtil.createDocSetGeneric(DocSetUtil.java:145)
>  at org.apache.solr.search.DocSetUtil.createDocSet(DocSetUtil.java:134)
>  at 
> org.apache.solr.search.SolrIndexSearcher.getDocSetNC(SolrIndexSearcher.java:1197)
>  at 
> org.apache.solr.search.SolrIndexSearcher.lambda$getAndCacheDocSet$1(SolrIndexSearcher.java:876)
>  at 
> org.apache.solr.search.FastLRUCache.lambda$computeIfAbsent$1(FastLRUCache.java:261)
>  at 
> org.apache.solr.util.ConcurrentLRUCache.lambda$computeIfAbsent$1(ConcurrentLRUCache.java:227)
>  at 
> java.base/java.util.concurrent.ConcurrentHashMap.computeIfAbsent(ConcurrentHashMap.java:1705)
>  at 
> org.apache.solr.util.ConcurrentLRUCache.computeIfAbsent(ConcurrentLRUCache.java:226)
>  at org.apache.solr.search.FastLRUCache.computeIfAbsent(FastLRUCache.java:259)
>  at 
> org.apache.solr.search.SolrIndexSearcher.getAndCacheDocSet(SolrIndexSearcher.java:876)
>  at 
> org.apache.solr.search.SolrIndexSearcher.getDocSet(SolrIndexSearcher.java:825)
>  at 
> org.apache.solr.search.JoinQuery$JoinQueryWeight.getDocSetEnumerate(JoinQParserPlugin.java:476)
>  at 
> org.apache.solr.search.JoinQuery$JoinQueryWeight.getDocSet(JoinQParserPlugin.java:452)
>  at 
> org.apache.solr.search.JoinQuery$JoinQueryWeight.scorer(JoinQParserPlugin.java:381)
>  at org.apache.lucene.search.Weight.bulkScorer(Weight.java:182)
>  at org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:656)
>  at org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:443)
>  at 
> org.apache.solr.search.SolrIndexSearcher.buildAndRunCollectorChain(SolrIndexSearcher.java:211)
>  at 
> org.apache.solr.search.SolrIndexSearcher.getDocListNC(SolrIndexSearcher.java:1622)
>  at 
> org.apache.solr.search.SolrIndexSearcher.getDocListC(SolrIndexSearcher.java:1439)
>  at 
> org.apache.solr.search.SolrIndexSearcher.search(SolrIndexSearcher.java:596)
>  at 
> org.apache.solr.handler.component.QueryComponent.doProcessUngroupedSearch(QueryComponent.java:1511)
>  at 
> org.apache.solr.handler.component.QueryComponent.process(QueryComponent.java:390)
>  at 
> org.apache.solr.handler.component.SearchHandler.handleRequestBody(SearchHandler.java:368)
>  at 
> org.apache.solr.handler.RequestHandlerBase.handleRequest(RequestHandlerBase.java:216)
>  at org.apache.solr.core.SolrCore.execute(SolrCore.java:2637)
>  



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

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

Reply via email to