2024.2.3.0-b21
tagged this
26 Feb 09:05
Summary:
Original commit: 9858cd2c87f9248c1c9d95a5882f68356f5f7db7 / D42139
This diff enables the test `org.yb.pgsql.TestYsqlMetrics` to run with connection manager. Mentioned test was failing while reading the metric named handler_latency_yb_ysqlserver_SQLProcessor_OtherStmts from 13000/metrics endpoint with connection manager. This metric tracks how many stmts has been executed.
With connection manager along with executing a transaction, it runs SET stmts and reset stmts.
After https://phorge.dev.yugabyte.com/D36903 2 less reset stmts are executed (RESET ROLE;SET SESSION AUTHORIZATION DEFAULT) and one extra guc variable even though not been changed is executed in deploy since pg 15 merge (SET datestyle=E'ISO') due to which the count for executing a transaction with conn mgr has reduced from 6 to 5. Below are 5 queries which runs while running a client query with connection manager for the TestYsqlMetrics#testMetrics
# SET extra_float_digits=E'3'
# SET application_name=E'PostgreSQL JDBC Driver'
# SET datestyle=E'ISO'
# CREATE TABLE test // Client Query
# RESET ALL;
Also TestYsqlMetrics#testMetricRows is meant to be skipped with connection manager, but it was still being executed done as part of https://phorge.dev.yugabyte.com/D41076. This diff fixes skipping the test with conn mgr with the reasons in comments.
**Merge conflicts resolved**
- Enable TestYsqlMetrics#testMetrics() in 2024.2 explicitly. In pg11/2024.2 branch, the number of stmts executed with conn mgr on executing a client query are 4 instead of 5 (in pg15) which are below.
# SET extra_float_digits=E'3'
# SET application_name=E'PostgreSQL JDBC Driver'
# CREATE TABLE test // Client Query
# RESET ALL;
- Add the code for skipping the TestysqlMetrics#testMetricRows() using skipYsqlConnMgr() utility.
Jira: DB-9910
Test Plan: Jenkins: enable connection manager, test regex: org.yb.pgsql.TestYsqlMetrics\..*
Reviewers: rbarigidad, skumar, devansh.saxena
Reviewed By: rbarigidad
Subscribers: yql, svc_phabricator
Differential Revision: https://phorge.dev.yugabyte.com/D42170