Hi While working on LUCENE-4575 I noticed what I thought was an inconsistency between prepareCommit() and prepareCommit(commitData). The former called ensureOpen(true) and the latter ensureOpen(false). At first I thought that this is a bug, so I fixed both to call ensureOpen(true), especially now that I consolidate the two prepCommit() versions into one, but then all tests failed with AlreadyClosedException. How wonderful :).
Getting deeper into the meaning of the two ensureOpen versions i realize that the boolean means something like "fail if IW has been closed, or is in the process of closing). Some methods choose to not fail if IW is in the process of closing, while others do (mostly internal methods). My question is - why make the distinction? If IW is in the process of closing, why not always fail? Shai