Exception in DocumentsWriter.addDocument can corrupt stored fields file (fdt) -----------------------------------------------------------------------------
Key: LUCENE-1094 URL: https://issues.apache.org/jira/browse/LUCENE-1094 Project: Lucene - Java Issue Type: Bug Affects Versions: 2.3 Reporter: Michael McCandless Assignee: Michael McCandless Fix For: 2.3 DocumentsWriter writes the number of stored fields, up front, into the fdtLocal buffer. Then, as each field is processed, it writes each stored field into this buffer. When the document is done, in a finally clause, it flushes the buffer to the real fdt file in the Directory. The problem is, if an exception is hit, that number of stored fields can be too high, which corrupts the fdt file. The solution is to not write it up front, and instead write only the number of fields we actually saw. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]