Issue Details (XML | Word | Printable)

Key: LUCENE-702
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Major Major
Assignee: Michael McCandless
Reporter: Michael McCandless
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
Lucene - Java

Disk full during addIndexes(Directory[]) can corrupt index

Created: 28/Oct/06 12:08 AM   Updated: 27/Feb/07 06:10 PM
Return to search
Component/s: Index
Affects Version/s: 2.1
Fix Version/s: 2.1

Time Tracking:
Not Specified

File Attachments:
  Size
Text File Licensed for inclusion in ASF works LUCENE-702.patch 2006-12-11 05:09 PM Michael McCandless 73 kB
Text File Licensed for inclusion in ASF works LUCENE-702.take2.patch 2006-12-12 12:52 PM Michael McCandless 77 kB
Text File Licensed for inclusion in ASF works LUCENE-702.take3.patch 2006-12-12 09:55 PM Michael McCandless 77 kB

Lucene Fields: New, Patch Available
Resolution Date: 18/Dec/06 04:53 PM


 Description  « Hide
This is a spinoff of LUCENE-555

If the disk fills up during this call then the committed segments file can reference segments that were not written. Then the whole index becomes unusable.

Does anyone know of any other cases where disk full could corrupt the index?

I think disk full should worse lose the documents that were "in flight" at the time. It shouldn't corrupt the index.



 All   Comments   Work Log   Change History   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order
Repository Revision Date User Message
ASF #488330 Mon Dec 18 16:45:29 UTC 2006 mikemccand LUCENE-702: make sure addIndexes(*) does not corrupt index on disk full; change to transactional semantics; fix IndexWriter.mergeSegments and IndexReader.commit to clean up (and leave instance consistent) on exception
Files Changed
MODIFY /lucene/java/trunk/src/java/org/apache/lucene/index/MultiReader.java
MODIFY /lucene/java/trunk/src/java/org/apache/lucene/store/RAMDirectory.java
MODIFY /lucene/java/trunk/src/test/org/apache/lucene/index/store/TestRAMDirectory.java
MODIFY /lucene/java/trunk/src/java/org/apache/lucene/index/SegmentReader.java
MODIFY /lucene/java/trunk/src/java/org/apache/lucene/index/IndexReader.java
ADD /lucene/java/trunk/src/test/org/apache/lucene/store/MockRAMOutputStream.java
MODIFY /lucene/java/trunk/src/test/org/apache/lucene/index/TestIndexReader.java
MODIFY /lucene/java/trunk/src/test/org/apache/lucene/index/TestIndexFileDeleter.java
ADD /lucene/java/trunk/src/test/org/apache/lucene/store/MockRAMDirectory.java
MODIFY /lucene/java/trunk/src/java/org/apache/lucene/index/IndexFileDeleter.java
MODIFY /lucene/java/trunk/src/java/org/apache/lucene/store/RAMOutputStream.java
MODIFY /lucene/java/trunk/src/java/org/apache/lucene/index/SegmentInfos.java
MODIFY /lucene/java/trunk/src/java/org/apache/lucene/index/IndexWriter.java
MODIFY /lucene/java/trunk/src/test/org/apache/lucene/index/TestIndexWriter.java
MODIFY /lucene/java/trunk/CHANGES.txt
MODIFY /lucene/java/trunk/src/java/org/apache/lucene/index/SegmentInfo.java

Repository Revision Date User Message
ASF #488640 Tue Dec 19 11:31:27 UTC 2006 mikemccand LUCENE-748: add javadoc around semantics of Exception during IndexWriter.close()
LUCENE-129: fix finalizers to always call super.finalize
LUCENE-301: add new constructors IndexWriter({String,File,Directory}, Analyzer) that create index if it's not already there, else append
LUCENE-701: found two cases of "open IndexWriter for create while reader is open, on Windows" that I didn't properly fix; added new test cases
LUCENE-702: corrected some small javadoc issues
Files Changed
MODIFY /lucene/java/trunk/src/java/org/apache/lucene/index/TermInfosReader.java
MODIFY /lucene/java/trunk/src/java/org/apache/lucene/store/NativeFSLockFactory.java
MODIFY /lucene/java/trunk/src/java/org/apache/lucene/index/SegmentReader.java
MODIFY /lucene/java/trunk/src/java/org/apache/lucene/index/IndexWriter.java
MODIFY /lucene/java/trunk/src/java/org/apache/lucene/index/IndexReader.java
MODIFY /lucene/java/trunk/src/test/org/apache/lucene/index/TestIndexWriter.java
MODIFY /lucene/java/trunk/CHANGES.txt
MODIFY /lucene/java/trunk/contrib/spellchecker/src/java/org/apache/lucene/search/spell/SpellChecker.java
MODIFY /lucene/java/trunk/src/java/org/apache/lucene/store/FSDirectory.java