Files Are Hard - via @sadisticsystems https://danluu.com/file-consistency/ …
-
Show this thread
-
Oh, here's a fun thought: "(...) memory corruption can cause disk corruption. This is especially annoying because memory corruption can cause you to take a checksum of bad data and write a bad checksum." The amount of things that can go wrong in a computer scares me a little.
1 reply 0 retweets 5 likesShow this thread -
Seriously though: how do you guard against memory corruption? Hash as soon as you get data, check when you write, write hash to disk then read hash from disk and check hash against written data again? Is this... is this how we prevent things from breaking?
3 replies 0 retweets 3 likesShow this thread -
Replying to @yoshuawuyts
From my understanding, that works as long as you assume the writing of the hash always works correctly, else an incorrect hash could invalidate correct data
1 reply 0 retweets 0 likes
hmmm, yeah true. I think the gist is that the data needs to be hashed twice. Once before write, and once after write to check if they match. If not, you trace back to what went wrong - and never ACK the request.
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.