5 ms·
Many distributed databases supporting linearizability fail to provide consistent backups. MongoDB's docs: "To capture a point-in-time backup from a sharded clu
by rystsov 10y ago
Many distributed databases supporting linearizability fail to provide consistent backups.
MongoDB's docs: "To capture a point-in-time backup from a sharded cluster you must stop all writes to the cluster"
Cassandra's docs: "To take a global snapshot, run the nodetool snapshot command using a parallel ssh utility ... This provides an eventually consistent backup. Although no one node is guaranteed to be consistent with its replica nodes at the time a snapshot is taken"
Riak's docs: "backups can become slightly inconsistent from node to node"
CockroachDB's docs: "The table data is dumped as it appears at the time that the command is started ... there is no guarantee that NOW() is monotonic in transaction order"
Does TiDB support consistent backups? Are there any docs covering how it is implemented?
- ngaut 10y agoYes, it does. Thanks to MVCC, TiDB supports the repeatable read isolation level which guarantees that any data read cannot change, if the transaction reads the same data again, it will find the previously read data in place, unchanged, and available to read. So we can use any MySQL tools such as mysqldump or mydumper to backup the database consistently. See the MVCC implementation here: https://pingcap.github.io/blog/2016/10/17/how-we-build-tidb/ https://pingcap.github.io/blog/2016/10/17/how-we-build-tidb/