Skip to content

[Bug]: cluster snapshot restore of sys panics deleting mo_role_privs #28206

Closed

Description

@gouhongshen

Is there an existing issue for the same bug?

  • I have checked the existing issues.

Branch Name

main (observed from PR #28182 validation)

Commit ID

PR head a1b6dcb; base main e7bb057

Other Environment Information

Actual Behavior

The cluster-level snapshot BVT fails at test/distributed/cases/snapshot/cluster_level_snapshot_restore_to_sys_account.sql:315 while executing:

restore account sys{snapshot="sp05"};

The server returns internal error: panic delete table failed. The stack reaches pkg/frontend.restoreRolePrivilegesAfterObjects / restoreSystemCatalogsAfterObjects, then pkg/vm/engine/disttae.(*txnDatabase).deleteTable. CN logging records FIND_TABLE deleteTableError for the mo_catalog.mo_role_privs lookup and two matching row IDs before the panic. The next show databases assertion also fails because db01 remains after the unsuccessful restore.

Expected Behavior

Restoring sys from the cluster snapshot succeeds and restores the snapshot state, so db01, which was created after snapshot sp05, is absent.

Steps to Reproduce

Run the PROXY multi-CN BVT case:

test/distributed/cases/snapshot/cluster_level_snapshot_restore_to_sys_account.sql

The minimal failing sequence in the case is:

drop snapshot if exists sp05;
create snapshot sp05 for cluster;
create database db01;
restore account sys{snapshot="sp05"};
show databases;

Additional information

This was observed while validating PR #28182, whose diff is limited to pkg/fileservice memory-cache allocation ownership and does not modify snapshot restore, frontend, compiler, or DistTAE code. The dependent Matrixone Utils CI / Coverage job failed only because this required BVT producer failed.

Related historical, closed reports use other restore scripts and do not cover this current cluster-level sys restore case: #19787, #18985, #19548.

Activity

  1. self-assigned this
    on Sep 5, 2026
  2. added
    kind/bug
    severity/s0
    ai-easy
    and removed on Sep 5, 2026
  3. gouhongshen commented on Sep 5, 2026

    @gouhongshen
    ContributorAuthor

    PR #28218 is trying to fix this issue.

  4. iamlinjunhong commented on Sep 5, 2026

    @iamlinjunhong
    Contributor

    Additional independent occurrence from PR #28145 at exact head ecaeaf6f86e3b00bd2d7b13965c3c490ad851cfa:

    This matches the existing sys-snapshot restore defect. One failed-jobs rerun for this run will be requested.

  5. gouhongshen commented on Sep 5, 2026

    @gouhongshen
    ContributorAuthor

    PR #28218 has merged and is awaiting manual validation. The issue remains open.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

ai-easykind/bugseverity/s0

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions