Skip to content

[4.2] fix: harden tenant view upgrades - #27314

Merged
aptend merged 4 commits into
matrixorigin:4.2-devfrom
aptend:backport/4.2-tenant-upgrade-s1-27287-27289
Aug 19, 2026
Merged

aptend merged 4 commits into
matrixorigin:4.2-devfrom
aptend:backport/4.2-tenant-upgrade-s1-27287-27289

Conversation

@aptend

@aptend aptend commented Aug 19, 2026

Copy link
Copy Markdown
Contributor

What type of PR is this?

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

Which issue(s) this PR fixes:

Refs #27287, #27288, #27289.

Backport of #27299 to 4.2-dev.

What this PR does / why we need it:

  • Makes the information_schema.TABLE_CONSTRAINTS tenant upgrade converge when an older tenant contains a same-named base table.
  • Stops the tenant-upgrade drain loop on errors or cancellation instead of spinning indefinitely.
  • Makes DROP VIEW IF EXISTS a no-op when the resolved object is a base table, while preserving the error for DROP VIEW without IF EXISTS.
  • Enables and updates the related BVT regressions.

This backport intentionally does not include the v4_0_6 changes from #27299 because those upgrade entries are not present on 4.2-dev.

Validation:

  • make thirdparties
  • GOWORK=off go list/build/vet/test for ./pkg/bootstrap, ./pkg/bootstrap/versions/v4_0_5, and ./pkg/sql/plan
  • Focused race tests, 100 repetitions each, plus full ./pkg/bootstrap race test
  • make build
  • drop_if_exists.sql: 47/47 passed, 0 ignored
  • alter_view.sql: 100/100 passed, 0 ignored

@qodo-code-review

Copy link
Copy Markdown

Qodo reviews are paused for this user.

Troubleshooting steps vary by plan Learn more →

On a Teams plan?
Reviews resume once this user has a paid seat and their Git account is linked in Qodo.
Link Git account →

Using GitHub Enterprise Server, GitLab Self-Managed, or Bitbucket Data Center?
These require an Enterprise plan - Contact us
Contact us →

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.

2 participants