Skip to content

Commit

Permalink
[#24171] YSQL: Adapt of the PgCatalogPerfTest.ResponseCacheMemoryLimi…
Browse files Browse the repository at this point in the history
…t unit test for pg15

Summary:
The `PgCatalogPerfTest.ResponseCacheMemoryLimit` fails on `pg15` due to too restrictive check of some metrics (`pg_response_cache_gc_calls` and `pg_response_cache_entries_removed_by_gc`). The value of this metrics may varies due to different reasons in different Postgres releases. Possible reasons are the size of each cache entry and the number of such entries due to difference in catalog tables content.
Jira: DB-13058

Test Plan:
Jenkins

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

Reviewers: jason

Reviewed By: jason

Subscribers: smishra, yql

Tags: #jenkins-ready

Differential Revision: https://phorge.dev.yugabyte.com/D38495
  • Loading branch information
d-uspenskiy committed Sep 30, 2024
1 parent 68d47f3 commit 7fb93f2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/yb/yql/pgwrapper/pg_catalog_perf-test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -536,8 +536,8 @@ TEST_F_EX(PgCatalogPerfTest, ResponseCacheMemoryLimit, PgCatalogWithLimitedCache
}
return static_cast<Status>(Status::OK());
})).cache;
ASSERT_EQ(cache_metrics.gc_calls, 9);
ASSERT_EQ(cache_metrics.entries_removed_by_gc, 26);
ASSERT_GT(cache_metrics.gc_calls, 0);
ASSERT_GE(cache_metrics.entries_removed_by_gc, cache_metrics.gc_calls);
auto response_cache_mem_tracker =
cluster_->mini_tablet_server(0)->server()->mem_tracker()->FindChild("PgResponseCache");
ASSERT_TRUE(response_cache_mem_tracker);
Expand Down

0 comments on commit 7fb93f2

Please sign in to comment.