Repository navigation
Description
Summary
Upgrade CI (3.0) — Compatibility Test With Release — fails with 25 BVT test errors across 7 test files. Two root causes identified:
- Leaked databases (
company,payroll,projects) persist in the sys account after upstream (release) tests, contaminating all subsequent HEAD BVT tests that useSHOW DATABASES,information_schema.tables,information_schema.columns, orSHOW ACCOUNTS. - Snapshot restore FK error in
snapshot_restore_to_table_fk_2.sql:restore account sys from snapshot snapshot_01fails withno such table acc_test02.aff01.
Failure Summary
| Test File | Failures | Root Cause |
|---|---|---|
tenant/cache.sql |
6 | Leaked DBs (show databases 8→11) |
snapshot/sys_restore_to_sys_account.sql |
8 | Leaked DBs (show databases 9→12, 8→11, 11→14) |
snapshot/sys_create_snapshot_for_sys_db_table_level.sql |
3 | Leaked DBs (show databases 9→12) |
snapshot/sys_restore_pubsub_to_sys_account.sql |
1 | Leaked DBs (show databases 9→12) |
zz_accesscontrol/inner_object.sql |
4 | Leaked DBs (duplicate employees/salaries tables in information_schema) |
tenant/tenant.test |
1 | Leaked DBs (show accounts db_count 8→11, tbl_count 107→127) |
table/system_table_cases.sql |
1 | Leaked DBs (table_constraints count 118→136) |
snapshot/snapshot_restore_to_table_fk_2.sql |
1 | FK restore bug (no such table acc_test02.aff01) |
Details
Issue 1: Leaked databases
After upstream (release) BVT tests complete and MO is upgraded to HEAD, 3 user databases remain in the sys account:
company
payroll
projects
These are visible in every subsequent SHOW DATABASES query. The source test that creates them without proper DROP DATABASE cleanup could not be identified in the current HEAD test tree — they may originate from the release version's test suite or from snapshot restores that recreate them.
Impact examples:
# tenant/cache.sql row:26 — EXPECT: 8 databases, ACTUAL: 11 (+company, +payroll, +projects)
# sys_restore_to_sys_account.sql row:288 — EXPECT: 11 databases, ACTUAL: 14
# inner_object.sql row:204 — EXPECT: no duplicate table names, ACTUAL: employees(×2), salaries(×2)
# system_table_cases.sql row:89 — EXPECT: table_constraints count=118, ACTUAL: 136 (+18 from leaked DBs)
Issue 2: Snapshot restore FK error
In snapshot_restore_to_table_fk_2.sql:
Line 543: create snapshot snapshot_01 for account; -- snapshot taken
Line 577: create database acc_test02; -- created AFTER snapshot
Line 594: create table aff01(...) REFERENCES pri01; -- FK table created AFTER snapshot
Line 872: restore account sys from snapshot snapshot_01;
-- EXPECT: success (null)
-- ACTUAL: "no such table acc_test02.aff01"
The restore fails because acc_test02.aff01 (with a FK to pri01) exists in the current state but not in the snapshot. The restore logic appears to validate FK references against current-state tables that won't exist after the restore.
Environment
- Branch:
3.0-dev(PR add right #24694,0528-add-right) - CI Job: Matrixone Upgrade CI (3.0) / Compatibility Test With Release on Linux/x64(LAUNCH)
- Run: https://github.com/matrixorigin/matrixone/actions/runs/26625306596/job/78461178387
- Date: 2026-05-29
Suggested Fix
- For leaked databases: Identify the test(s) creating
company,payroll,projectsand addDROP DATABASE IF EXISTScleanup in both upstream and head test files. Consider adding a cleanup step between upstream and head test phases in the Upgrade CI workflow. - For snapshot restore: Investigate whether
restore account sysshould drop FK-dependent tables (acc_test02.aff01) before restoring, or skip FK validation for tables that don't exist in the target snapshot.
Activity
3.0: fix: skip already deleted relations in database delete (#24715)
4.0: fix: skip already deleted relations in database delete (#24716)
fix: skip already deleted relations in database delete (#24717)
Revert "4.0: fix: skip already deleted relations in database delete (#…
Revert "fix: skip already deleted relations in database delete (#24717)…
Revert "3.0: fix: skip already deleted relations in database delete (#…
3.0: fix: restore database delete skip for already deleted relations (#…
fix: restore database delete skip for already deleted relations (#24748)
4.0: fix: restore database delete skip for already deleted relations (#…
gouhongshen commentedon Jun 8, 2026
dup: #23955
should be fixed
fix: skip already deleted relations in database delete (matrixorigin#…
Revert "fix: skip already deleted relations in database delete (matri…
fix: restore database delete skip for already deleted relations (matr…
fix: skip already deleted relations in database delete (matrixorigin#…
Revert "fix: skip already deleted relations in database delete (matri…
fix: restore database delete skip for already deleted relations (matr…
fix: skip already deleted relations in database delete (matrixorigin#…
Revert "fix: skip already deleted relations in database delete (matri…
fix: restore database delete skip for already deleted relations (matr…