Uploaded image for project: 'Solr'
  1. Solr
  2. SOLR-15762

IllegalStateException: Recursive update thrown when executing complex Join queries

    XMLWordPrintableJSON

Details

    Description

      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)

       

      Attachments

        1. ParameterizedJoinQueryTest.java
          4 kB
          Thomas Wöckinger

        Activity

          People

            mdrob Mike Drob
            thomas.woeckinger Thomas Wöckinger
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0h
                0h
                Logged:
                Time Spent - 2h 50m
                2h 50m