-
Notifications
You must be signed in to change notification settings - Fork 4.1k
backupccl: teach makeSimpleImportSpans to exclude backup data on spans that were later reintroduced #87305
Copy link
Copy link
Closed
Labels
A-disaster-recoveryC-bugCode not up to spec/doc, specs & docs deemed correct. Solution expected to change code/behavior.Code not up to spec/doc, specs & docs deemed correct. Solution expected to change code/behavior.C-technical-advisoryCaused a technical advisoryCaused a technical advisoryT-disaster-recoverybranch-release-21.2Used to mark GA and release blockers, technical advisories, and bugs for 21.2Used to mark GA and release blockers, technical advisories, and bugs for 21.2branch-release-22.1Used to mark GA and release blockers, technical advisories, and bugs for 22.1Used to mark GA and release blockers, technical advisories, and bugs for 22.1
Description
Currently RESTORE cannot properly handle restoring a table that had a non-mvcc rollback, without adding some logic to makeSimpleImportSpans.
Consider the following timeline:
- Begin IMPORT INTO on existing table foo, ingest some data
- Backup foo
- Rollback IMPORT via clearRange
- Incremental backup of foo, with a full reintroduction of foo’s span
- RESTORE foo: the imported data leaks into the restore
- See test here. grep for “this is bad”
This occurs because 1) makeSimpleImportSpans naively includes the backup file with the imported data as part of foo's restoreSpanEntry and 2) the backups have MVCC delete history related to the rollback. This was never a problem in previous releases because offline importing data were not backed up until the import succeeded.
To address this, makeSimpleImportSpan needs to exclude backup files for a span that was later reintroduced due to a non-mvcc bulk op.
Jira issue: CRDB-19262
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
A-disaster-recoveryC-bugCode not up to spec/doc, specs & docs deemed correct. Solution expected to change code/behavior.Code not up to spec/doc, specs & docs deemed correct. Solution expected to change code/behavior.C-technical-advisoryCaused a technical advisoryCaused a technical advisoryT-disaster-recoverybranch-release-21.2Used to mark GA and release blockers, technical advisories, and bugs for 21.2Used to mark GA and release blockers, technical advisories, and bugs for 21.2branch-release-22.1Used to mark GA and release blockers, technical advisories, and bugs for 22.1Used to mark GA and release blockers, technical advisories, and bugs for 22.1