Skip to content

fix: preserve user tables with internal-looking names - #26219

Merged
XuPeng-SH merged 6 commits into
matrixorigin:mainfrom
VioletQwQ-0:codex/issue-26121-user-table-filter
Jul 29, 2026
Merged

XuPeng-SH merged 6 commits into
matrixorigin:mainfrom
VioletQwQ-0:codex/issue-26121-user-table-filter

Conversation

@VioletQwQ-0

Copy link
Copy Markdown
Collaborator

What type of PR is this?

  • API-change
  • BUG
  • Improvement
  • Documentation
  • Feature
  • Test and CI
  • Code Refactoring

Which issue(s) this PR fixes:

Fixes #26121

What this PR does / why we need it:

Database-level CLONE and Data Branch operations filtered source tables by internal-looking names. Legal persistent user tables could therefore be silently omitted from copies, and DATA BRANCH DELETE DATABASE could skip them during validation.

This change identifies actual index, temporary, partition, and sequence relations by relkind. The two exact special-table exclusions remain scoped to mo_catalog, so snapshot/restore behavior for real system tables is preserved.

Regression coverage exercises all three reported name shapes through Data Branch database creation, database CLONE, and destructive Data Branch database deletion validation. The test failed on the old implementation and passes after the fix.

Validation:

  • go test ./pkg/frontend -count=1
  • go test ./pkg/tests/issues -run '^TestIssue26121DatabaseOperationsKeepOrdinaryInternalLookingTables$' -count=1
  • schema v4 exact-head preflight: PASS review=PASS

@matrix-meow matrix-meow added the size/M Denotes a PR that changes [100,499] lines label Jul 27, 2026
@mergify mergify Bot added the kind/bug Something isn't working label Jul 27, 2026
@VioletQwQ-0
VioletQwQ-0 marked this pull request as ready for review July 27, 2026 09:11
@VioletQwQ-0
VioletQwQ-0 force-pushed the codex/issue-26121-user-table-filter branch from 108dd71 to 02f1402 Compare July 28, 2026 03:33
@mergify mergify Bot removed the dequeued label Jul 28, 2026
@VioletQwQ-0
VioletQwQ-0 force-pushed the codex/issue-26121-user-table-filter branch from 02f1402 to 3a3f2a8 Compare July 28, 2026 03:36
@VioletQwQ-0
VioletQwQ-0 force-pushed the codex/issue-26121-user-table-filter branch from 3a3f2a8 to 920b957 Compare July 28, 2026 11:02
@mergify

mergify Bot commented Jul 29, 2026 •

Copy link
Copy Markdown
Contributor

Merge Queue Status

  • ✅ Entered queue — 2026-07-29 04:17 UTC · Rule: main · triggered by rule Automatic queue on approval for main
  • 🟠 Checks running · in-place
  • 🚫 Left the queue — 2026-07-29 05:45 UTC · at 6a801415130fd7afb9339985352115b17733205f

This pull request spent 1 hour 28 minutes in the queue, with no time running CI.

Reason

The pull request can't be updated

This pull request seems to come from a fork, and Mergify needs the author's permission to update its branch.
The author needs to enable "Allow edits from maintainers" on this pull request, or update the branch manually.

Hint

You should update or rebase your pull request manually. If you do, this pull request will automatically be requeued once the queue conditions match again.
If you think this was a flaky issue, you can requeue the pull request, without updating it, by posting a @mergifyio queue comment.

Tick the box to put this pull request back in the merge queue (same as @mergifyio queue).

  • Requeue this pull request

This branch was previously deployed

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

Labels

kind/bug Something isn't working size/M Denotes a PR that changes [100,499] lines

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: Database Data Branch and CLONE filter persistent user tables by internal-looking names

3 participants