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

Vigya Sharma commented on LUCENE-10647:
---------------------------------------

I think the cause of this failure is related, but slightly different from 
https://issues.apache.org/jira/browse/LUCENE-10617.. However, I'm not able to 
repro it on my box despite running the tests on repeat.

My hunch is that we are hitting an exception in the {{addDocument()}} API, 
which gets swallowed by the catch block. But, as a result, we end up calling 
{{writer.rollback()}} before (or rather without) calling 
getMergeScheduler().sync(). 
Once rollback is triggered, MergeThreads exit with an abort, which is swallowed 
(and not rethrown) by {{{}writer.handleMergeExceptions(){}}}. This leaves the 
excCalled flag as unset, causing the assertion error.

(Code Ref - 
[https://github.com/apache/lucene/blob/main/lucene/core/src/test/org/apache/lucene/TestMergeSchedulerExternal.java#L133-L139)|https://github.com/apache/lucene/blob/main/lucene/core/src/test/org/apache/lucene/TestMergeSchedulerExternal.java#L133-L139]

I can raise a quick PR with a fix But I don't have a good way to test and 
confirm as this has not reproed on my box so far.

> Failure in TestMergeSchedulerExternal.testSubclassConcurrentMergeScheduler
> --------------------------------------------------------------------------
>
>                 Key: LUCENE-10647
>                 URL: https://issues.apache.org/jira/browse/LUCENE-10647
>             Project: Lucene - Core
>          Issue Type: Improvement
>            Reporter: Vigya Sharma
>            Priority: Major
>
> Recent builds are intermittently failing on 
> TestMergeSchedulerExternal.testSubclassConcurrentMergeScheduler. Example:
> https://jenkins.thetaphi.de/job/Lucene-main-Linux/35576/testReport/junit/org.apache.lucene/TestMergeSchedulerExternal/testSubclassConcurrentMergeScheduler/



--
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