Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[#11691] xCluster: (Fix) Do not return error when schema name not fou…
…nd for YSQL tables Summary: This is a fix for an issue introduced by the previous diff https://phabricator.dev.yugabyte.com/D17099 Issue: https://yugabyte.slack.com/archives/C03G3F2H4AU/p1654647033631909 It appears that it is possible that some YSQL tables' schema names can not be found even in pg system tables. Previously, an error was raised in this case. The fix is to change the error to a warning message. Test Plan: Manually let all non-system YSQL tables passing the two if-clauses in the following block in `CatalogManager::GetTableSchemaInternal`: ``` if (!table->is_system() && l->table_type() == TableType::PGSQL_TABLE_TYPE && !resp->schema().has_pgschema_name()) { SharedLock lock(mutex_); TRACE("Acquired catalog manager lock for schema name lookup"); auto pgschema_name = GetPgSchemaName(table); if (!pgschema_name.ok() || pgschema_name->empty()) { LOG(WARNING) << Format( "Unable to find schema name for YSQL table $0.$1 due to error: $2", table->namespace_name(), table->name(), pgschema_name.ToString()); } else { resp->mutable_schema()->set_pgschema_name(*pgschema_name); } } ``` Verify that no error is returned. Reviewers: jhe Reviewed By: jhe Subscribers: ybase, bogdan Differential Revision: https://phabricator.dev.yugabyte.com/D17563
- Loading branch information