Skip to content

Support materialized view out-of-place complete refresh cutover in TiFlash schema sync #10773

@windtalker

Description

@windtalker

Enhancement

Support materialized view out-of-place complete refresh in TiFlash schema sync.

Background:

  • TiDB introduces ActionCreateMaterializedViewShadow to create the shadow materialized view table during out-of-place refresh.
  • TiDB introduces ActionMViewRefreshOutOfPlaceCutover to 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 ActionCreateMaterializedViewShadow like materialized view table creation and register the shadow table in schema sync.
  • Handle ActionMViewRefreshOutOfPlaceCutover by 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    type/enhancementThe issue or PR belongs to an enhancement.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions