I run 2 programs in separate process. On program created a file and write to the end 64K a time till the file size reaches 1G. The other program was launched after writer started (file created) to read the same time. In my first iteration, reader program could not read anything even after write finishes and exit. I added "UpdateFilesize" to update filesize when read returns 0. Reader can read data after writer finishes.
I believe reader should be allowed to read even if write does not close the file yet. It is ok for writer to keep the lease on last chunk. But for completed chunk, It should allow everybody to read.