Closed shishir2001-yb closed 7 months ago
Possible cause as stated by @myang2021 :
What happened is that yb-master used to only rely on the gflag --ysql_enable_db_catalog_version_mode=true to decide whether it operates in perdb or not. After the above change, it also reads the pg_yb_catalog_version table to see if it has more than 1 rows. But it is doing that as part of heartbeat response message preparation. Let’s say after a new master leader is elected, before it receives the very first heartbeat request, it receives a request to get the current operation mode: its catalog_version_table_in_perdbmode is initialized to false so it will return false. But that’s not right, it should be unknown or return an error, because the value isn’t set yet. Now since it returned false, the caller will think this new master leader still operates in global catalog version mode despite the gflag --ysql_enable_db_catalog_version_mode=true. In global catalog version mode it will read the current version from template1 in pg_yb_catalog_version, that’s incorrect because pg_yb_catalog_version has > 1 rows already.
Jira Link: DB-10157
Description
Tried on version 2.21.1.0-b158:
Logs: https://drive.google.com/file/d/1Nqk5MRaK8wpf9tIifqRjAQzbJ3bO_Kvc/view?usp=sharing
While running the Cross-DB-DDLs sample app in parallel with PITR, some index creation query started failing with below error:
Test details
List of DDLs executed in sample app
Issue Type
kind/bug
Warning: Please confirm that this issue does not contain any sensitive information