MongoDB's Extreme Modeling: Conformance Checking in Practice

2025-06-02

MongoDB engineers experimented with TLA+ specifications and two conformance checking techniques (trace checking and test-case generation) to verify their product implementations against specifications. The trace-checking experiment, conducted on the MongoDB server, aimed to validate the implementation of the Raft consensus protocol; the test-case generation experiment, on the MongoDB Mobile SDK, aimed to validate the operational transformation algorithm. Results showed that trace checking failed due to the difficulty of snapshotting the state of a multithreaded program and discrepancies between the specification and implementation, while test-case generation successfully uncovered a bug in the algorithm and achieved 100% branch coverage. The article summarizes lessons learned and presents recent advancements in the field, highlighting the importance of continuous conformance checking for TLA+ mainstream adoption.

Read more
Development Conformance Checking

MongoDB's Proactive Approach to Data Corruption in the Cloud

2024-12-25

MongoDB Atlas, a global cloud database service, tackles the challenge of silent data corruption at petabyte scale. The article details MongoDB's software-level solutions, including checksum validation, leveraging indexes and replication, and utilizing redundant replicas for repair. This three-step process—proactive monitoring, precise pinpointing, and data repair—ensures data integrity even in the face of hardware failures or random errors. MongoDB's approach effectively shields customers from the complexities of hardware management, guaranteeing data reliability and security.

Read more