You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Uwe Schindler (JIRA)" <ji...@apache.org> on 2014/12/31 14:13:13 UTC

[jira] [Updated] (LUCENE-6150) Remove staleFiles map from FSDirectory

     [ https://issues.apache.org/jira/browse/LUCENE-6150?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Uwe Schindler updated LUCENE-6150:
----------------------------------
    Attachment: LUCENE-6150.patch

This removes the staleFiles set from FSDirectory. We already have enough tests that ensures that we have no longer any files that were deleted before. If we still miss some files, FSDirectory should not silently ignore those deleted files and throw IOException.

I ran all tests with FSDirectory enabled and got no failures because of synced files that do not exist.

I would like to commit this and let it bake to discover any bugs caused by not correctly tracking written files. But as MockDir already tracks this I am confident.

Maybe [~mikemccand] can give some more insight!

> Remove staleFiles map from FSDirectory
> --------------------------------------
>
>                 Key: LUCENE-6150
>                 URL: https://issues.apache.org/jira/browse/LUCENE-6150
>             Project: Lucene - Core
>          Issue Type: Bug
>            Reporter: Uwe Schindler
>            Assignee: Uwe Schindler
>             Fix For: 5.0, Trunk
>
>         Attachments: LUCENE-6150.patch
>
>
> Hi,
> the "hack" to keep track of files written to in FSDirectory, to filter them when calling sync is heavily broken. [~mikemccand] already opened an issue, which was abandoned then.
> In fact handling this in FSDirectory is a hack and broken! If IndexWriter is itsself not able to correctly handle tracking the files, it is also his repsonsibilty to do this. We already have a class that can do this: TrackingDirectoryWrapper. IndexWriter should use an instance of this class to track those stale files (until the problem is solved).
> I would like to keep FSDirectory clean from this, especially, as this is broken anyways: If somebody has another directory impl like HDFS or Infinispan, the problem still persists. The base directory should throw an IOException if trying to sync a file that does not exist!



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

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