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
The function YBIsDBCatalogVersionMode() was originally introduced for multi-tenancy use case. So when it returns true, it used to assume there are many databases. This is no longer true because we now also support per-database catalog version mode in single tenant clusters. We should go over the use of YBIsDBCatalogVersionMode() to fix any place where multi-tenancy use case is implied.
This was noticed when reviewing the following code:
/*
* YB mode uses local-tserver prefetching instead of relcache file.
* TODO: either put this under a GUC variable or remove the old code
* below.
*/
if (IsYugaByteEnabled() &&
*YBCGetGFlags()->ysql_catalog_preload_additional_tables &&
!YBIsDBCatalogVersionMode())
return false;
Warning: Please confirm that this issue does not contain any sensitive information
I confirm this issue does not contain any sensitive information.
The text was updated successfully, but these errors were encountered:
… use case
Summary:
The function `YBIsDBCatalogVersionMode()` was originally introduced for
multi-tenancy use case. So when it returns true, it used to assume that there
are many databases. This is no longer true because we now also support
per-database catalog version mode in single tenant clusters. We should
go over the use of `YBIsDBCatalogVersionMode()` to fix any place where
multi-tenancy use case is implied.
I found one such place: when `YBIsDBCatalogVersionMode()` returns true,
currently we will not use tserver response cache and will use rel cache init
file. The assumption was that in multi-tenancy use case there will be many
databases so the tserver response cache hit ratio will be low because different
databases cannot share the same tserver cache entry. So even when tserver
response cache is turned on by default, we should not use it for multi-tenant
clusters. Now that `YBIsDBCatalogVersionMode()` can be used in single-tenant
clusters, which typically have only a few databases, then we should not prevent
the use of tserver response cache when `YBIsDBCatalogVersionMode()` is true. To
disable tserver cache when there are many databases, users can manually set
`--ysql_enable_read_request_caching` to false.
Jira: DB-7334
Test Plan: ./yb_build.sh release --cxx-test pg_catalog_version-test
Reviewers: jason
Reviewed By: jason
Subscribers: ssong, yql
Differential Revision: https://phorge.dev.yugabyte.com/D27148
Jira Link: DB-7334
Description
The function YBIsDBCatalogVersionMode() was originally introduced for multi-tenancy use case. So when it returns true, it used to assume there are many databases. This is no longer true because we now also support per-database catalog version mode in single tenant clusters. We should go over the use of
YBIsDBCatalogVersionMode()
to fix any place where multi-tenancy use case is implied.This was noticed when reviewing the following code:
Warning: Please confirm that this issue does not contain any sensitive information
The text was updated successfully, but these errors were encountered: