Uploaded image for project: 'Lucene.Net'
  1. Lucene.Net
  2. LUCENENET-442

ParallelMultiSearcher threads don't handle all exceptions

    XMLWordPrintableJSON

Details

    Description

      The ParallelMultiSearcher doesn't allow non-IOException exceptions thrown by its threads to be managed by the calling application.

      LUCENENET-388 worked around one specific example of this, but any genuine Lucene exception (eg: BooleanQuery.TooManyClauses) will also fall foul of this pattern.

      In our specific instance we could treat the symptoms and up the max clause count, but I'm sure there will be more. Could the System.IOException be generalised to System.Exception? Or would that be too much deviation from the Java code base?

      Example stack trace of an exception thrown by a Searcher executed:

      Framework Version: v4.0.30319
      Description: The process was terminated due to an unhandled exception.
      Exception Info: Lucene.Net.Search.BooleanQuery+TooManyClauses
      Stack:
      at Lucene.Net.Search.BooleanQuery.Add(Lucene.Net.Search.BooleanClause)
      at Lucene.Net.Search.BooleanQuery.Add(Lucene.Net.Search.Query, Occur)
      at Lucene.Net.Search.PrefixQuery.Rewrite(Lucene.Net.Index.IndexReader)
      at Lucene.Net.Search.BooleanQuery.Rewrite(Lucene.Net.Index.IndexReader)
      at Lucene.Net.Search.IndexSearcher.Rewrite(Lucene.Net.Search.Query)
      at Lucene.Net.Search.Query.Weight(Lucene.Net.Search.Searcher)
      at Lucene.Net.Search.Searcher.CreateWeight(Lucene.Net.Search.Query)
      at Lucene.Net.Search.Searcher.Search(Lucene.Net.Search.Query, Lucene.Net.Search.Filter, Lucene.Net.Search.HitCollector)
      at Lucene.Net.Search.Searcher.Search(Lucene.Net.Search.Query, Lucene.Net.Search.HitCollector)
      at Lucene.Net.Search.QueryWrapperFilter.Bits(Lucene.Net.Index.IndexReader)
      at Lucene.Net.Search.CachingWrapperFilter.Bits(Lucene.Net.Index.IndexReader)
      at Lucene.Net.Search.IndexSearcher.Search(Lucene.Net.Search.Weight, Lucene.Net.Search.Filter, Lucene.Net.Search.HitCollector)
      at Lucene.Net.Search.IndexSearcher.Search(Lucene.Net.Search.Weight, Lucene.Net.Search.Filter, Int32)
      at Lucene.Net.Search.MultiSearcherThread.Run()
      at System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean)
      at System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object)
      at System.Threading.ThreadHelper.ThreadStart()

      Attachments

        Activity

          People

            digydigy Digy
            androidandy Andy Twidle
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: