florisrobbemont commented on issue #1013:
URL: https://github.com/apache/lucenenet/issues/1013#issuecomment-2656104520
I'm also getting this error with 4.8.0-beta00017. Even when I clone the
latest master it keeps crashing.
My setup is not that complex:
- Multiple threads using a single SearchManager
- Simple FacetsCollector + FacetCounter (FastTaxonomyFacetCounts)
```csharp
public static Dictionary<string, FacetResult> GetFacetResults(this
BooleanQuery facetQuery, ILuceneIndex index, FacetsConfig facetsConfig)
{
var results = new Dictionary<string, FacetResult>();
var searcher = index.SearcherManager.Acquire();
try
{
// This collector accumulates all hits for faceting
var fc = new FacetsCollector();
FacetsCollector.Search(searcher, facetQuery, int.MaxValue, fc);
// Get the facet counts
var facetCounts = new FastTaxonomyFacetCounts(index.FacetReader,
facetsConfig, fc);
// For each facetable field, gather its facet
foreach (var facetField in facetsConfig.DimConfigs.Keys)
{
var fr = facetCounts.GetTopChildren(int.MaxValue,
facetField);
if (fr != null)
{
// store it using the same "key" in results:
results[facetField] = fr;
}
}
}
finally
{
index.SearcherManager.Release(searcher);
searcher = null;
}
return results;
}
```
At first the exception was random, but when I run this method 10 times
simultaneously the error starts popping up more often.
When I attach a debugger it always seems to crash on something in
PriorityQueue<T>. But I can't figure out if this is a multi-threading issue
(PriorityQueue<T> doesn't seem to be shared, because even when I synclock all
the different methods the crash still happen).
So it doesn't feel like a concurrency bug, although it gets triggered more
when doing concurrent searches.
Let me know if you need anything from me. We're about 3-4 weeks from going
into production with this, so we're highly motivated to make this work ;)
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]