-
Notifications
You must be signed in to change notification settings - Fork 5
Data corruption on disk
Radu Marias edited this page Dec 8, 2024
·
5 revisions
It's possible that the disk will eventually become corrupted, causing some data loss. In such cases, replicas help, too. We can use consensus to determine which is the correct version of the file and replace the broken one.
Additionally, we can use error-correcting codes like Reed–Solomon error correction, which will help recover the data in some cases.
We can also use Merkle trees [https://en.wikipedia.org/wiki/Merkle_tree] to check file integrity.
We need some processes that periodically check the data if it gets corrupted. They do that by obtaining a consensus on the Merkle tree of the valid file and comparing it to replicas in all nodes. If a shard is corrupted, it will be replaced by triggering a sync with other nodes.