lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Simon Willnauer (JIRA)" <>
Subject [jira] [Commented] (LUCENE-3237) FSDirectory.fsync() may not work properly
Date Thu, 10 Apr 2014 12:57:19 GMT


Simon Willnauer commented on LUCENE-3237:

{quote} Ref counting may be overkill? Who else will be pulling/sharing this
sync handle? Maybe we can add a "IndexOutput.closeToSyncHandle", the
IndexOutput flushes and is unusable from then on, but returns the sync
handle which the caller must later close.{quote}



One downside of moving to this API is ... it rules out writing some
bytes, fsyncing, writing some more, fsyncing, e.g. if we wanted to add
a transaction log impl on top of Lucene. But I think that's OK
(design for today). There are other limitations in IndexOuput for
xlog impl...


I don't see what keeps us from adding a sync method to IndexOutput that allows us to bytes,
fsyncing, writing some more, fsyncing. I think we should make this change nevertheless. This
can go in today I independent from where we use it.

bq. Yeah we can pursue this in "phase 2". 

> FSDirectory.fsync() may not work properly
> -----------------------------------------
>                 Key: LUCENE-3237
>                 URL:
>             Project: Lucene - Core
>          Issue Type: Bug
>          Components: core/store
>            Reporter: Shai Erera
>         Attachments: LUCENE-3237.patch
> Spinoff from LUCENE-3230. FSDirectory.fsync() opens a new RAF, sync() its FileDescriptor
and closes RAF. It is not clear that this syncs whatever was written to the file by other
FileDescriptors. It would be better if we do this operation on the actual RAF/FileOS which
wrote the data. We can add sync() to IndexOutput and FSIndexOutput will do that.
> Directory-wise, we should stop syncing on file names, and instead sync on the IOs that
performed the write operations.

This message was sent by Atlassian JIRA

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

View raw message