Support materialized view out-of-place complete refresh cutover in TiFlash schema sync
Open
Nobody has claimed this yet.
affects-8.5
component/compute
type/enhancement
- Dominant language
- C++
- Stars
- 1k
- Forks
- 423
- Avg merge
- 1d 15h
- Merged PRs (30d)
- 24
Description
Enhancement
Support materialized view out-of-place complete refresh in TiFlash schema sync.
Background:
- TiDB introduces
ActionCreateMaterializedViewShadowto create the shadow materialized view table during out-of-place refresh. - TiDB introduces
ActionMViewRefreshOutOfPlaceCutoverto atomically cut over from the old materialized view table to the refreshed shadow table. - TiFlash schema sync needs to understand both actions so local metadata stays consistent during the refresh flow.
Expected behavior:
- Treat
ActionCreateMaterializedViewShadowlike materialized view table creation and register the shadow table in schema sync. - Handle
ActionMViewRefreshOutOfPlaceCutoverby renaming the shadow table to the logical MV name and tombstoning the old MV table ID in the same schema version. - Add schema sync test coverage for the full out-of-place refresh cutover flow.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in the TiFlash schema sync handling for materialized view table creation and trace how schema actions update local metadata. Add coverage for ActionCreateMaterializedViewShadow followed by ActionMViewRefreshOutOfPlaceCutover, verifying the shadow is renamed to the logical materialized view name and the old table ID is tombstoned in the same schema version.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- databases
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 68/100