Uploaded image for project: 'Infinispan'
  1. Infinispan
  2. ISPN-625

Lucene Directory's methods length, filemodified, touch should return 0L instead of FileNotFoundException for unexistent files

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Major
    • 4.1.0.Final
    • 4.1.0.CR3
    • None
    • None

    Description

      Lucene appears to be inconsistent on this behaviour; the FSDirectory documents a FileNotfoundException but actually returns 0 while the RAMDirectory implements the FileNotfoundException but is totally synchronized,
      I assume the FSDirectory is more reliable in this case and we got a reported error about this, my rationale is that the race condition which FSDirectory can handle is never an issue in the synchronized blocks of RAMDirectory.

      Inspecting the code of Lucene, there appears to be no harm done in returning 0 for unexistend metadata.

      Attachments

        Activity

          People

            sgrinove Sanne Grinovero
            sgrinove Sanne Grinovero
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: