is there a Redo / Undo log in CockroachDB?

46 views
Skip to first unread message

Hank

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

Thanks,

Haoqiong

Jingguo Yao

unread,
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

unread,
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 cockroach-db...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/cockroach-db/17871b71-a9da-49e8-b49a-1f97649432d8%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages