all-things-risingwave
What is the role of timestamp or epoch in maintaining a consistent view of data on top of MVCC?
In the discussion, Gopher mentioned the usage of timestamp or epoch for maintaining a consistent view of data on top of MVCC. Tianyi Zhuang added that epoch is a coarse-grained version. Can you explain the role of timestamp or epoch in this context?
Go
Gopher
Asked on Dec 30, 2022
- Timestamp or epoch is used in MVCC (Multi-Version Concurrency Control) systems to provide a consistent view of data.
- Timestamps or epochs help in determining the order of transactions and versions of data.
- Epochs are considered as a coarse-grained version of timestamps in this context.
Example:
# Using timestamp for MVCC
timestamp = get_current_timestamp()
# Using epoch for MVCC
epoch = get_current_epoch()
Jan 03, 2023Edited by