Improved fault tolerance for nsettings.cgi

All notes and input on 2.0 Development are herein. <ul><li>Feature requests</li>
<li>Bug Reports</li>
<li>Beta Testing Feedback</li>
<li>Open Dev Discussion</li></ul>

Moderator: Coranto Moderator Team

Improved fault tolerance for nsettings.cgi

Postby Parahead » Wed Jul 28, 2004 7:32 am

OK, in the Coranto history we have had a lot of people suffering from the nsettings.cgi file being wiped out to 0 bytes. I know that this where happening more frequently in the early versions of Coranto and I honestly don´t know exactly what changes where made back then to minimize this...

But we still are having people reporting about this and it is possible to improve the fault tolerance even more... Currently in the sub SaveCConfig(), the file is just being wiped out and then written to. If the webserver is running out of disk space, this will cause the file being corrupted or most likely to be just 0 byte. Instead a smilar approach could be applied as when writing data to newsdat.txt and this would not happen, we have not had any reports about people having their newsdat.txt file wiped out, correct?

The difference between how the two files are written to is that newsdat.txt is not written to directly, but a second file is written to first, then if everything went well, the files are being renamed and finaly the old file removed... It is just a matter of looking at how the subs EditNewsdat_Start() and EditNewsdat_Finish() works and duplicate this behaviour inside SaveCConfig().

Feedback on this?
Yes, I am still around...
www.parahead.com/coranto/
User avatar
Parahead
 
Posts: 4837
Joined: Fri Jan 12, 2007 8:54 pm
Location: Stockholm - Sweden

Return to Coranto 2.0 Development

Who is online

Users browsing this forum: No registered users and 1 guest

cron