lucene-dev mailing list archives

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

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

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}

good!

{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...

{quote}

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". 
agreed

> FSDirectory.fsync() may not work properly
> -----------------------------------------
>
>                 Key: LUCENE-3237
>                 URL: https://issues.apache.org/jira/browse/LUCENE-3237
>             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
(v6.2#6252)

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


Mime
View raw message