[ 
https://issues.apache.org/jira/browse/SOLR-18135?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18119729#comment-18119729
 ] 

ASF subversion and git services commented on SOLR-18135:
--------------------------------------------------------

Commit e7ab25535ff3321ca32a4f42871bf7e7f153f9bf in solr's branch 
refs/heads/branch_10x from Nick
[ https://gitbox.apache.org/repos/asf?p=solr.git;h=e7ab25535ff ]

SOLR-18135: Preserve merge exception; stop merge timer only once (#4939)

(cherry picked from commit 8e02c856a1bb0ce84999cbeb6fc0ccc19095b4a3)


> 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
>              Labels: pull-request-available
>          Time Spent: 1h 50m
>  Remaining Estimate: 0h
>
> 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]

Reply via email to