[ https://issues.apache.org/jira/browse/LUCENE-600?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12749641#action_12749641 ]
Michael Busch commented on LUCENE-600: -------------------------------------- {quote} I contributed the first patch to make flush-by-size possible; see Lucene-709. There is no incompatibility with ParallelWriter, even the early version contributed here 3 years ago. {quote} I should have been more precise: flush and *merge* by size. Also the patch provided here doesn't allow deleting by term or query, unless the field(s) the terms or queries are searched on are contained in all parallel indexes, right? Also with this approach, what happens if you commit one indexWriter successfully, but a parallel one fails during commit and needs to be rolled back. How are these consistency issues handled? > ParallelWriter companion to ParallelReader > ------------------------------------------ > > Key: LUCENE-600 > URL: https://issues.apache.org/jira/browse/LUCENE-600 > Project: Lucene - Java > Issue Type: Improvement > Components: Index > Affects Versions: 2.1 > Reporter: Chuck Williams > Priority: Minor > Attachments: ParallelWriter.patch > > > A new class ParallelWriter is provided that serves as a companion to > ParallelReader. ParallelWriter meets all of the doc-id synchronization > requirements of ParallelReader, subject to: > 1. ParallelWriter.addDocument() is synchronized, which might have an > adverse effect on performance. The writes to the sub-indexes are, however, > done in parallel. > 2. The application must ensure that the ParallelReader is never reopened > inside ParallelWriter.addDocument(), else it might find the sub-indexes out > of sync. > 3. The application must deal with recovery from > ParallelWriter.addDocument() exceptions. Recovery must restore the > synchronization of doc-ids, e.g. by deleting any trailing document(s) in one > sub-index that were not successfully added to all sub-indexes, and then > optimizing all sub-indexes. > A new interface, Writable, is provided to abstract IndexWriter and > ParallelWriter. This is in the same spirit as the existing Searchable and > Fieldable classes. > This implementation uses java 1.5. The patch applies against today's svn > head. All tests pass, including the new TestParallelWriter. -- 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: java-dev-unsubscr...@lucene.apache.org For additional commands, e-mail: java-dev-h...@lucene.apache.org