lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Michael McCandless (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (LUCENE-3230) Make FSDirectory.fsync() public and static
Date Fri, 24 Jun 2011 10:36:47 GMT

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

Michael McCandless commented on LUCENE-3230:
--------------------------------------------

OK, I think close this issue, and open another (to switch to syncing the actual IOs we opened)...
this will be a challenge for Lucene though.

> Make FSDirectory.fsync() public and static
> ------------------------------------------
>
>                 Key: LUCENE-3230
>                 URL: https://issues.apache.org/jira/browse/LUCENE-3230
>             Project: Lucene - Java
>          Issue Type: New Feature
>          Components: core/store
>            Reporter: Shai Erera
>            Assignee: Shai Erera
>            Priority: Minor
>             Fix For: 3.3, 4.0
>
>
> I find FSDirectory.fsync() (today protected and instance method) very useful as a utility
to sync() files. I'd like create a FSDirectory.sync() utility which contains the exact same
impl of FSDir.fsync(), and have the latter call it. We can have it part of IOUtils too, as
it's a completely standalone utility.
> I would get rid of FSDir.fsync() if it wasn't protected (as if encouraging people to
override it). I doubt anyone really overrides it (our core Directories don't).
> Also, while reviewing the code, I noticed that if IOE occurs, the code sleeps for 5 msec.
If an InterruptedException occurs then, it immediately throws ThreadIE, completely ignoring
the fact that it slept due to IOE. Shouldn't we at least pass IOE.getMessage() on ThreadIE?
> The patch is trivial, so I'd like to get some feedback before I post it.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org


Mime
View raw message