You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[yugabyte#9797] DocDB: Avoid catalog version going backward during online upgrade
Summary:
Before and during a major YSQL version upgrade, through the heartbeat mechanism, the master provides current catalog versions to tservers from the PG11 catalog versions table. Note that DDLs are not allowed during a YSQL major version upgrade, and the PG15 catalogs are being updated by being set to semantic equivalents of PG11. To the PG11-only clients (tservers), there is only one valid catalog version state and that is the state when the upgrade began.
While going through the upgrade flow, the C++ upgrade tests keep the cluster running while the YB master is switched out of upgrade mode. When the master is switched out of upgrade mode in this way, it switches to providing the current catalog versions from the PG15 catalog versions table, which is fresh and sets everything as version 1. Thus tservers see the version number going down and probabilistically crash themselves with the following error message:
Ignoring ysql db 13245 catalog version update: new version too old. New: 1, Old: 2, ignored count: 31
Fix this incorrect state by copying the contents of the PG11 catalog versions table to PG15, right after the PG15 catalog is established, and before returning success of the catalog upgrade.
Test Plan:
Jenkins
On MacOS arm64:
./yb_build.sh release --cxx-test pg15_upgrade-test --gtest_filter=Pg15UpgradeTest.Schemas
Reviewers: hsunder
Subscribers: ybase, yql
Differential Revision: https://phorge.dev.yugabyte.com/D38961
0 commit comments