BlockMissingException is thrown under this test scenario:
Two different processes doing concurrent file r/w: one read and the other write on the same file
- writer keep doing file write
- reader doing position file read from beginning of the file to the visible end of file, repeatedly
The reader is basically doing:
byteRead = in.read(currentPosition, buffer, 0, byteToReadThisRound);
where CurrentPostion=0, buffer is a byte array buffer, byteToReadThisRound = 1024*10000;
Usually it does not fail right away. I have to read, close file, re-open the same file a few times to create the problem. I'll pose a test program to repro this problem after I've cleaned up a bit my current test program.