When working on
LUCENE-3084, I had a copy-paste error in my patch (see revision 1124307 and corrected in 1124316), I replaced pendingCommit by segmentInfos in IndexWriter, corrected by the following patch:
This did not cause any test failure.
On IRC, Mike said:
[19:21] mikemccand: ThetaPh1: hmm
[19:21] mikemccand: well
[19:22] mikemccand: pendingCommit and sis only differ while commit() is running
[19:22] mikemccand: ie if a thread starts commit
[19:22] mikemccand: but fsync is taking a long time
[19:22] mikemccand: and another thread makes a change to sis
[19:22] ThetaPh1: ok so hard to find that bug
[19:22] mikemccand: we need our mock dir wrapper to sometimes take a long time syncing....
Maybe we need such a test, I feel bad when such stupid changes don't make any test fail.