You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@solr.apache.org by "Chris M. Hostetter (Jira)" <ji...@apache.org> on 2026/02/26 00:22:00 UTC
[jira] [Created] (SOLR-18135) merge exception cause silently lost if assertions enabled; caused by double stop() of RTimer
Chris M. Hostetter created SOLR-18135:
-----------------------------------------
Summary: 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
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: issues-unsubscribe@solr.apache.org
For additional commands, e-mail: issues-help@solr.apache.org