Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
core: provide an temporary linearalizability mode (for taking consistent backups) #36208
Is your feature request related to a problem? Please describe.
Possibility to create data consistent backups is the most important feature of every database. Current implementation creates a consistent backup in regard to global state of CRDB. While the global state is OK from operational point of view, this is very bad for backups. There is no way to tell which data is not consistent.
High availability of CRDB doesn't help here, because HA isn't backup solution.
Describe the solution you'd like
As described in forum post, the main idea is to put CRDB temporary in linearizable mode. This can be achieved by temporal hold of writes (like google spanner) for probably 250ms or something global (like clock) to coordinate writes with reduced write throughput for same 250ms.
From my point of view, temporal delay of writes or reduced write throughput is totally OK, if there is a need for data consistent backups, even if it takes more than 250ms.
Describe alternatives you've considered
I have another idea that might be much easier to implement. What do you think about some sort of global transaction to retrieve a global time travel timestamp? Like (pseudo code):
BEGIN GLOBAL WRITE; SELECT CURRENT SYSTEM TIME; COMMIT;
Which lock all tables for writes, get consolidated timestamp and unlock all tables again. After that you can use returned value (ex.
cockroach dump <database> <flags> --as-of='2016-01-25T10:10:10.555555'
Beside of much easier implementation and consistent backups, you get two benefits:
What do you think, guys?
Hi @Bessonov, thank you for your patience, and sorry for not getting back on this earlier. We don't have any work planned on this for the 19.2 release this fall, but I've taken note of the problem you're trying to solve and am investigating possible solutions for future releases.