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

Uwe Schindler commented on LUCENE-6902:
---------------------------------------

Hi, patch looks good. I will take this issue and commit it after doing my usual 
checks (modifications on fsync are

Mike is right, the testFsyncFile is wrong, it syncs the directory.

The assume on not windows is not needed for the directory test, please remove 
it! Because fsyncing a directory may always fail on any operating system and 
this is correctly checked in the code (supresses exception). So just remove the 
assume on windows. Removing it actually checks that our assert statement in the 
code works correct.

> Fail fsync immediately
> ----------------------
>
>                 Key: LUCENE-6902
>                 URL: https://issues.apache.org/jira/browse/LUCENE-6902
>             Project: Lucene - Core
>          Issue Type: Improvement
>            Reporter: Daniel Mitterdorfer
>            Priority: Minor
>         Attachments: ioutils-fsync-fail-fast.patch
>
>
> While analysing a build issue in Elasticsearch I stumpled upon 
> org.apache.lucene.util.IOUtils.fsync. It has a retry loop in fsync whenever 
> an IOException occurs. However, there are lots of instances where a retry is 
> not useful, e.g. when a channel has been closed, a ClosedChannelException is 
> thrown and IOUtils#fsync still tries to fsync multiple times on the closed 
> channel.
> After bringing the issue to Robert's attention, he even opted for removing 
> the retry logic entirely for fsyncing.
> Please find attached a patch that removes the retry logic.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to