cockroachdb / cockroachdb/cockroach

pcr: prevent resuming replication after flashback

Open
#120,832 3 comments 0 reactions 0 assignees View on GitHub
C-enhancement T-disaster-recovery
Dominant language
Go
Stars
32.5k
Forks
4.1k
PR merge metrics
PR metrics pending

Description

An `ALTER REVERT` will destroy the MVCC history back to the revert time which can cause physical replication to be incorrect.

If REVERT is run on the source for replication, we need to ensure that resumed replication resumes from the time reverted to, or previous divergence time, whichever is earlier. This means that that the source needs to send the revert time in the prior replication status call so that that can be used instead of the cutover time in the consumer's tenant record if it is earlier.

If REVERT is run on the consumer after cutover to a time earlier than the cutover time, it should haul backwards the tracked cover time to reflect the lost history.

Jira issue: CRDB-36893

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.