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

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Done
    • Affects Version/s: 4.1.0.CR3
    • Fix Version/s: 4.1.0.Final
    • Component/s: None
    • Labels:
      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.

        Gliffy Diagrams

          Attachments

            Activity

              People

              • Assignee:
                sannegrinovero Sanne Grinovero
                Reporter:
                sannegrinovero Sanne Grinovero
              • Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: