lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 23534] New: - Poor file modification resolution on OSX causes reader/writer conflict test to fail
Date Tue, 30 Sep 2003 21:57:18 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=23534>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=23534

Poor file modification resolution on OSX causes reader/writer conflict test to fail

           Summary: Poor file modification resolution on OSX causes
                    reader/writer conflict test to fail
           Product: Lucene
           Version: CVS Nightly - Specify date in submission
          Platform: Macintosh
        OS/Version: MacOS X
            Status: NEW
          Severity: Normal
          Priority: Other
         Component: Store
        AssignedTo: lucene-dev@jakarta.apache.org
        ReportedBy: hani@formicary.net


Since the file modification resolution on OSX appears to be 1000ms, the touchFile method in

FSDirectory ends up not actually modifying the file's modification time. This in turn causes
the 
IndexReader not to detect that it is working with stale info, thus losing information.

The same problem happens in the optimize call, where a new segment file is written, but this
is 
not detected as being 'newer' than the old one.

I am unsure of whether the fixes I propose are 100% correct though (adding a directory.touchFile

at the end of the optimize method). Maybe there should be some locking involved, as this could

take up to a second?

Anyway, here's a patch, so those in the know can decide on exactly how to tweak it to ensure
it's 
perfect for all situations

Mime
View raw message