Repository navigation
fix: recreate missing character sets table during upgrade - #27369
Conversation
Qodo reviews are paused for this user.Troubleshooting steps vary by plan Learn more → On a Teams plan? Using GitHub Enterprise Server, GitLab Self-Managed, or Bitbucket Data Center? |
XuPeng-SH
left a comment
There was a problem hiding this comment.
Deep-reviewed exact head ff3407f810e9416f724b6921dacaa4b4ef53fd2b. No P0/P1/P2 blocker found.
The repair is correctly ordered: the idempotent CHARACTER_SETS existence/create entry precedes population. The lowercase lookup matches the canonical catalog identity: both the current internal executor and the historical bootstrap parser normalize these system DDLs with lower_case_table_names=1; the object has always been a base table. Existing tables are left untouched, while a missing table is recreated from the same DDL used for fresh tenants.
The VersionOffset advances and the equal-version path deliberately reruns the current v4.0.6 handler, so tenants already reporting 4.0.6 receive this repair. Creation, population, subsequent upgrade entries, tenant version, and task progress remain in one transaction; failure rolls back atomically and retries are idempotent. Tenant rows serialize competing workers, and the error drain returns to the outer timer rather than hot-looping. Q1-Q3 found no new ownership, wait-graph, or unbounded-resource issue.
Validation passed: full pkg/bootstrap/versions/v4_0_6 and pkg/bootstrap race suites, repeated same-version/offset and idempotence tests, and git diff --check.
Merge Queue Status
This pull request spent 1 hour 12 minutes in the queue, including 52 minutes 21 seconds running CI. Required conditions to merge
|
…in#27369) The v4.0.6 tenant upgrade populates `information_schema.CHARACTER_SETS`, but a legacy tenant can be missing that table entirely. The population check then fails before the upgrade SQL can run. This PR adds an idempotent table-creation entry before the population entry: - recreate a missing `CHARACTER_SETS` table from the canonical DDL; - leave an existing table unchanged; - advance the v4.0.6 `VersionOffset` so same-version deployments execute the repair. Validation: - complete `pkg/bootstrap/versions/v4_0_6` package tests; - focused creation, population, entry-order, and metadata tests; - same-version `VersionOffset` tenant-upgrade regression in `pkg/bootstrap`; - `go build`, `go vet`, and `git diff --check`. Approved by: @XuPeng-SH
…in#27369) The v4.0.6 tenant upgrade populates `information_schema.CHARACTER_SETS`, but a legacy tenant can be missing that table entirely. The population check then fails before the upgrade SQL can run. This PR adds an idempotent table-creation entry before the population entry: - recreate a missing `CHARACTER_SETS` table from the canonical DDL; - leave an existing table unchanged; - advance the v4.0.6 `VersionOffset` so same-version deployments execute the repair. Validation: - complete `pkg/bootstrap/versions/v4_0_6` package tests; - focused creation, population, entry-order, and metadata tests; - same-version `VersionOffset` tenant-upgrade regression in `pkg/bootstrap`; - `go build`, `go vet`, and `git diff --check`. Approved by: @XuPeng-SH
…in#27369) The v4.0.6 tenant upgrade populates `information_schema.CHARACTER_SETS`, but a legacy tenant can be missing that table entirely. The population check then fails before the upgrade SQL can run. This PR adds an idempotent table-creation entry before the population entry: - recreate a missing `CHARACTER_SETS` table from the canonical DDL; - leave an existing table unchanged; - advance the v4.0.6 `VersionOffset` so same-version deployments execute the repair. Validation: - complete `pkg/bootstrap/versions/v4_0_6` package tests; - focused creation, population, entry-order, and metadata tests; - same-version `VersionOffset` tenant-upgrade regression in `pkg/bootstrap`; - `go build`, `go vet`, and `git diff --check`. Approved by: @XuPeng-SH
What type of PR is this?
Which issue(s) this PR fixes:
Related to #27287
What this PR does / why we need it:
The v4.0.6 tenant upgrade populates
information_schema.CHARACTER_SETS, but a legacy tenant can be missing that table entirely. The population check then fails before the upgrade SQL can run.This PR adds an idempotent table-creation entry before the population entry:
CHARACTER_SETStable from the canonical DDL;VersionOffsetso same-version deployments execute the repair.Validation:
pkg/bootstrap/versions/v4_0_6package tests;VersionOffsettenant-upgrade regression inpkg/bootstrap;go build,go vet, andgit diff --check.