lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Robert Muir (JIRA)" <>
Subject [jira] [Commented] (LUCENE-6902) Fail fsync immediately
Date Thu, 19 Nov 2015 16:47:11 GMT


Robert Muir commented on LUCENE-6902:

+1 to remove this retry. Its especially bad since its just "any IOException".

I think it is a relic from when this method used RandomAccessFile (and would sometimes create
files). If it turns out some hack is really needed (e.g. on windows), then we should at least
contain it better to a more specific case or think about how we can avoid it.

> Fail fsync immediately
> ----------------------
>                 Key: LUCENE-6902
>                 URL:
>             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

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message