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

ASF subversion and git services commented on LUCENE-9408:
---------------------------------------------------------

Commit f47de19c4e38a6886593899d22ecb18665652e77 in lucene-solr's branch 
refs/heads/master from Simon Willnauer
[ https://gitbox.apache.org/repos/asf?p=lucene-solr.git;h=f47de19 ]

LUCENE-9408: Ensure OneMerge#mergeFinished is only called once (#1590)

in the case of an exception it's possible that some OneMerge instances
will be closed multiple times. This commit ensures that mergeFinished is
really just called once instead of multiple times.

> OneMerge#mergeFinish is called multiple times
> ---------------------------------------------
>
>                 Key: LUCENE-9408
>                 URL: https://issues.apache.org/jira/browse/LUCENE-9408
>             Project: Lucene - Core
>          Issue Type: Bug
>            Reporter: Simon Willnauer
>            Priority: Minor
>          Time Spent: 50m
>  Remaining Estimate: 0h
>
> After enforcing calling this method only once a random test caused 
> OneMerge#mergeFinished to be called multiple times.
> {noformat}
> 21:06:59    [junit4] Suite: org.apache.lucene.index.TestIndexFileDeleter
> 21:06:59    [junit4]   2> NOTE: reproduce with: ant test  
> -Dtestcase=TestIndexFileDeleter -Dtests.method=testExcInDeleteFile 
> -Dtests.seed=BCFF67862FF6529B -Dtests.slow=true -Dtests.badapples=true 
> -Dtests.locale=haw-US -Dtests.timezone=Etc/Zulu -Dtests.asserts=true 
> -Dtests.file.encoding=ISO-8859-1
> 21:06:59    [junit4] FAILURE 0.04s J0 | 
> TestIndexFileDeleter.testExcInDeleteFile <<<
> 21:06:59    [junit4]    > Throwable #1: java.lang.AssertionError
> 21:06:59    [junit4]    >     at 
> __randomizedtesting.SeedInfo.seed([BCFF67862FF6529B:518F81E5ACB0444E]:0)
> 21:06:59    [junit4]    >     at 
> org.apache.lucene.index.TestIndexFileDeleter.testExcInDeleteFile(TestIndexFileDeleter.java:525)
> 21:06:59    [junit4]    >     at 
> java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> 21:06:59    [junit4]    >     at 
> java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
> 21:06:59    [junit4]    >     at 
> java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> 21:06:59    [junit4]    >     at 
> java.base/java.lang.reflect.Method.invoke(Method.java:566)
> 21:06:59    [junit4]    >     at 
> java.base/java.lang.Thread.run(Thread.java:834)
> {noformat}
> mergeFinished should only be called once.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org
For additional commands, e-mail: issues-h...@lucene.apache.org

Reply via email to