Company
Date Published
Author
Vivek Menezes
Word count
881
Language
English
Hacker News points
None

Summary

CockroachDB is designed to ensure data survivability through its distributed consistent key-value store and replication model, utilizing Raft consensus for replicated writes to guarantee data durability. Each write is synchronously replicated across multiple nodes, ensuring that if one node fails, others retain an exact copy of the data. To bolster confidence in this model, a subsystem periodically verifies the consistency of data across replicas, using SHA-512 checksums to identify replication discrepancies. Despite initial confidence in the system's reliability, verification processes uncovered bugs such as non-deterministic protocol buffer encodings, unauthorized replica updates, incorrect merging of time series data, and non-deterministic floating point additions, which were subsequently addressed. CockroachDB not only aims to provide a robust database system that withstands failures but also aspires to implement automatic online verification for additional features like indexes and foreign keys, ensuring trust through continuous validation.