The patch fixes most of the threading and exception issues.
Now >99% of the core tests pass! Some failures are expected, because some features aren't implemented yet (e.g. flush by RAM or maxBufferedDeletes). A test though that I still want to fix with this patch is TestStressIndexing2 - not sure yet what's going on.
- Factored ReaderPool out of IndexWriter into its own class
- Added a FilterDirectory that forwards all method calls to a delegate
- Use an extended FilterDirectory in DW to track all files the consumers and codecs open, so that they can be closed on abort
- Fixed some more nocommits
Using the FilterDirectory might not be the cleanest approach? Maybe a IndexOutputFactory or something would be cleaner? Or maybe on abort we should just delete all files that have the prefix of the segment(s) the DWPT(s) were working on? This should be possible now that the shared doc stores are gone and no files are shared anymore across segments.