LUCENE-8962: Merge small segments on commit by s1monw · Pull Request #1617 · apache/lucene-solr (original) (raw)
This PR revisits the merge-on-commit patch submitted by @msfroh a little while ago. The only change from that earlier PR is a fix for failures uncovered by TestIndexWriter.testRandomOperations, some whitespace cleanups, and a rebase on the current master branch. The problem was that updateSegmentInfosOnMergeFinish would incorrectly decRef a merged segments' files if that segment was modified by deletions (or updates) while it was being merged.
With this fix, I ran the failing test case several thousands of times with no failures, whereas before it would routinely fail after a few hundred test runs.
Co-authored-by: Michael Froh msfroh@apache.org
Co-authored-by: Michael Sokolov sokolov@falutin.net
This is the third try after the patch itself and #1552