is there a Redo / Undo log in CockroachDB?

Skip to first unread message


Jan 22, 2019, 4:02:58 AM1/22/19
to CockroachDB
Is there anything like undo or redo log in cockroach DB? How to trace the state of a historical transaction?



Jingguo Yao

Jan 30, 2019, 4:44:42 AM1/30/19
to CockroachDB
CockroachDB is an MVCC system. So at the distributed key-value layer, there is no undo/redo log. And CockroachDB uses RocksDB for its local storage. RocksDB has a Write-Ahead-Log which can be considered as a REDO log.

Andrei Matei

Jan 30, 2019, 11:38:44 AM1/30/19
to Jingguo Yao, CockroachDB
There's no real equivalent of a redo log in Cockroach because CRDB is a distributed system. There's no global log of any sort. Different ranges of data use their own independent Raft logs, and then there's also the per-store log RocksDB log that Jingguo mentions which effectively combines the Raft logs of the different ranges with replicas on the store plus other things.
Any of these are unlikely to be what you want since we don't have tools to consume them in any convenient way. Generally there's no way to exactly reconstruct history at a low level. However, we have a "change data capture" mechanism for streaming database updates at a very high level.
If you describe what you're trying to do more, perhaps there are tricks that we could suggest.

You received this message because you are subscribed to the Google Groups "CockroachDB" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
To view this discussion on the web visit
For more options, visit
Reply all
Reply to author
0 new messages