Looking at the code, I think that today flush() cannot throw diskFullEx? MockIO checks for diskFull in writeBytes and copyBytes, using dir.sizeInBytes.
So I think if you limit maxSize=5 and write 4 + 4 bytes, to a Directory with a buffer of 20 bytes, then both writeBytes will succeed (as dir.sizeInBytes = 0). flush() will also succeed since it only calls delegate.flush(). So I think either MDW should track its size, or MockIO track the num written bytes? Shai On Thu, May 16, 2013 at 7:08 PM, Robert Muir <rcm...@gmail.com> wrote: > On Thu, May 16, 2013 at 8:45 AM, Adrien Grand <jpou...@gmail.com> wrote: > > > Using the Mock IndexOutput to track bytes is an option, but I was > > thinking it could be interesting too to see what happens with > > directories that buffer content so that the disk full exception > > happens in flush instead of writeBytes? > > > > But it can easily happen in both places... > > --------------------------------------------------------------------- > To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org > For additional commands, e-mail: dev-h...@lucene.apache.org > >