[
https://issues.apache.org/jira/browse/SOLR-18135?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18061235#comment-18061235
]
Chris M. Hostetter commented on SOLR-18135:
-------------------------------------------
Tagging in [~dsmiley] & [~liangkaiwen] since I'm not up to speed on the OTEL
stuff ... and I definitely don't understand why {{SolrIndexWriter.merge()}}
stops the timer in it's catch block if the catch block is also going to call
{{SolrIndexWriter.updateMergeMetrics()}} in a way that is suppose to stop the
timer.
> merge exception cause silently lost if assertions enabled; caused by double
> stop() of RTimer
> --------------------------------------------------------------------------------------------
>
> Key: SOLR-18135
> URL: https://issues.apache.org/jira/browse/SOLR-18135
> Project: Solr
> Issue Type: Bug
> Affects Versions: 10.0
> Reporter: Chris M. Hostetter
> Priority: Major
>
> Found this in a downstream project unit test (with java assertions enabled)
> while testing out a Solr-10.0 RC....
> {noformat}
> 2> org.apache.lucene.index.MergePolicy$MergeException:
> java.lang.AssertionError
> 2> at __randomizedtesting.SeedInfo.seed([A6D71FE893244373]:0)
> 2> at
> org.apache.lucene.index.ConcurrentMergeScheduler.handleMergeException(ConcurrentMergeScheduler.java:764)
> 2> at
> org.apache.lucene.index.ConcurrentMergeScheduler$MergeThread.run(ConcurrentMergeScheduler.java:756)
> 2> Caused by: java.lang.AssertionError
> 2> at org.apache.solr.util.RTimer.stop(RTimer.java:84)
> 2> at
> org.apache.solr.metrics.otel.instruments.AttributedLongTimer$MetricTimer.stop(AttributedLongTimer.java:64)
> 2> at
> org.apache.solr.update.SolrIndexWriter.updateMergeMetrics(SolrIndexWriter.java:315)
> 2> at
> org.apache.solr.update.SolrIndexWriter.merge(SolrIndexWriter.java:225)
> 2> at
> org.apache.lucene.index.IndexWriter$IndexWriterMergeSource.merge(IndexWriter.java:6601)
> 2> at
> org.apache.lucene.index.ConcurrentMergeScheduler.doMerge(ConcurrentMergeScheduler.java:668)
> 2> at
> org.apache.lucene.index.ConcurrentMergeScheduler$MergeThread.run(ConcurrentMergeScheduler.java:729)
> {noformat}
> Based on the line numbers, what appears to be happening is:
> * {{SolrIndexSearcher.merge(...)}} catches some {{Throwable}} from either
> {{super.merge(...)}} or {{updateMergeMetrics(...,true,false, timer)}}
> ** {{SolrIndexSearcher.merge(...)}} catch block calls {{timer.stop()}}
> ** Then {{SolrIndexSearcher.merge(...)}} catch block calls
> {{updateMergeMetrics(...,true,true,timer)}}
> *** This causes {{updateMergeMetrics(...)}} to try to stop the timer again,
> tripping an assert in RTTimer
> * The {{AssertionError}} propogates up out of
> {{SolrIndexSearcher.merge(...)}}
> ** the original {{Throwable}} is lost
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]