Skip to content

2.23.1.0-b17

Summary:
In case of cache refresh YSQL keeps catalog read time. In context of current statement processing all on demand loading of catalog entries will use this read time.
With current approach it is possible that YSQL will use quite old catalog version from response cache and will try to perform on demand loading with read time from the cached response. This read time could be too old for reading from a master.

Solution is to reset catalog read time after finishing catalog table prefetching. Because response cache is used only on prefetching step.

**Note:**
This diff introduces helper functions
- SetNonDDLTxnAllowedForSysTableWrite
- IncrementAllDBCatalogVersions

Some changes in unrelated unit tests relates to the usage of this functions.
Jira: DB-12342

Test Plan:
new unit test was introduced

```
./yb_build.sh --gtest_filter PgCatalogPerfTest.OnDemandLoadingAfterCatalogCacheRefresh
```

Reviewers: pjain, kfranz, myang

Reviewed By: myang

Subscribers: yql

Tags: #jenkins-ready

Differential Revision: https://phorge.dev.yugabyte.com/D37126
Assets 2
Loading