What happens when I am writing n bytes to a RandomAccessFile (or for that matter to a File), and the process dies?
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Swapnil_Ghiware
Posted On:   Friday, November 2, 2001 03:19 PM

Assume following scenario:
I am writing N bytes(a record) to a RandomAccessFile. Before I complete writing those bytes to the file, the process dies.
Will that make the entire file corrupt. Or only the record which I was writing (when I died) will be corrupt.
I am hoping that I could do a "seek" and move the next record in the RandomAccessFile.

Any inputs would be appreciated.

Thanks,
Swapnil.

Re: What happens when I am writing n bytes to a RandomAccessFile (or for that matter to a File), and the process dies?

Posted By:   John_Zukowski  
Posted On:   Saturday, November 3, 2001 11:20 PM

There is no single answer of it will always do blah. It depends. That's why you use a database that deals with recovery issues like this.
About | Sitemap | Contact