Yonik Seeley wrote:
But, I'm still renaming segments_N.new -> segments_N,
Hmmm, remind me why you need the .new file? Why can't you just create
segments_N after you are finished writing all of the segments?
Because there could be a reader that tries to read the file before it's
done being written. It would hit EOF and throw an IOException.
And also, to avoid trouble with filesystem caching I'd to only ever open
a given file X once X is done being written. I think the "write once"
approach (never re-using a file-name) prevents the kinds of caching
issues that eg cause the problems over NFS.
however I think
we could remove that one by instead creating a separate "done" file, eg
"segments_N.done"
Yes, that sounds like it would work. No renaming... cool!
I think so! I will test it...
Mike
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]