c - Delayed Write errors -


for past few months, we've been losing data delayed write errors. i've experienced error both custom code , shrink-wrap applications. example, error message below came visual studio 2008 on building solution

windows - delayed write failed : windows unable save data file \vital\source\other\ochshp\done07\lhftinstaller\release\lhfai.cab. data has been lost. error may caused failure of computer hardware or network connection. please try save file elsewhere.

when occurs in adobe, visual studio, or word, example, no harm done. major problem when occurs our custom applications (straight c apps writes data in dbase files network share.)

from program's perspective, write succeeds. deletes source data, , goes on next record. few minutes later, windows pops error message saying delayed write occurred , data lost.

my question is, can help our networking/server teams isolate , correct problem (read, convince them problem real. telling them many, many times hasn't convinced them of yet) , have suggestions of how can write avoid data loss?

writes on windows, modern operating system, not sent disk until os gets around it. big performance win, problem (as have found) cannot detect errors @ time of write.

every operating system asynchronous writes provides mechanisms forcing data disk. on windows, flushfilebuffers or _commit function trick. (one handles, other file descriptors.)

note must check return value of every disk write, and return value of these synchronizing functions, in order data made disk. note these functions block , wait data reach disk -- if writing network server -- can slow. not call them until need push data stable storage.

for more, see fsync() across platforms.


Comments

Popular posts from this blog

linux - Using a Cron Job to check if my mod_wsgi / apache server is running and restart -

actionscript 3 - TweenLite does not work with object -

jQuery Ajax Render Fragments OR Whole Page -