diff --git a/java/yb-ysql-conn-mgr/src/test/java/org/yb/ysqlconnmgr/TestStatsAndMetrics.java b/java/yb-ysql-conn-mgr/src/test/java/org/yb/ysqlconnmgr/TestStatsAndMetrics.java index 16d4c68871e8..69da320c3a0e 100644 --- a/java/yb-ysql-conn-mgr/src/test/java/org/yb/ysqlconnmgr/TestStatsAndMetrics.java +++ b/java/yb-ysql-conn-mgr/src/test/java/org/yb/ysqlconnmgr/TestStatsAndMetrics.java @@ -27,7 +27,7 @@ public class TestStatsAndMetrics extends BaseYsqlConnMgr { "user_name", "active_logical_connections", "queued_logical_connections", - "idle_or_pending_logical_connections", + "waiting_logical_connections", "active_physical_connections", "idle_physical_connections", "avg_wait_time_ns", @@ -117,7 +117,7 @@ private void testNumLogicalConnections(String db_name, int num_logical_conn = pool.get("active_logical_connections").getAsInt() + pool.get("queued_logical_connections").getAsInt() + - pool.get("idle_or_pending_logical_connections").getAsInt(); + pool.get("waiting_logical_connections").getAsInt(); assertEquals("Did not get the expected number of logical connections for pool with user " + user_name + " and database " + db_name, exp_val, num_logical_conn); } diff --git a/src/odyssey/sources/cron.c b/src/odyssey/sources/cron.c index 3b47d8891341..2061e6ec4188 100644 --- a/src/odyssey/sources/cron.c +++ b/src/odyssey/sources/cron.c @@ -80,7 +80,7 @@ static int od_cron_stat_cb(od_route_t *route, od_stat_t *current, route->client_pool.count_active; instance->yb_stats[index].queued_clients = route->client_pool.count_queue; - instance->yb_stats[index].idle_or_pending_clients = + instance->yb_stats[index].waiting_clients = route->client_pool.count_pending; instance->yb_stats[index].active_servers = route->server_pool.count_active; diff --git a/src/postgres/src/backend/utils/misc/yb_ysql_conn_mgr_helper.c b/src/postgres/src/backend/utils/misc/yb_ysql_conn_mgr_helper.c index 22f8d539ac1d..4189c58d71f2 100644 --- a/src/postgres/src/backend/utils/misc/yb_ysql_conn_mgr_helper.c +++ b/src/postgres/src/backend/utils/misc/yb_ysql_conn_mgr_helper.c @@ -887,7 +887,7 @@ YbGetNumYsqlConnMgrConnections(const char *db_name, const char *user_name, * can get changed while reading the shared memory segment. */ *num_logical_conn += shmp[itr].active_clients + - shmp[itr].idle_or_pending_clients + + shmp[itr].waiting_clients + shmp[itr].queued_clients; *num_physical_conn += shmp[itr].active_servers + shmp[itr].idle_servers; } diff --git a/src/yb/tserver/metrics_snapshotter.cc b/src/yb/tserver/metrics_snapshotter.cc index d87a283288db..544495f0bcab 100644 --- a/src/yb/tserver/metrics_snapshotter.cc +++ b/src/yb/tserver/metrics_snapshotter.cc @@ -377,7 +377,7 @@ Status MetricsSnapshotter::Thread::DoYsqlConnMgrMetricsSnapshot(const client::Ta if (strcmp(stat.database_name, "control_connection") != 0) { total_logical_connections += stat.active_clients + stat.queued_clients + - stat.idle_or_pending_clients; + stat.waiting_clients; total_physical_connections += stat.active_servers + stat.idle_servers; } } diff --git a/src/yb/yql/pggate/webserver/pgsql_webserver_wrapper.cc b/src/yb/yql/pggate/webserver/pgsql_webserver_wrapper.cc index d7253c0a0ee2..dd50760f2d15 100644 --- a/src/yb/yql/pggate/webserver/pgsql_webserver_wrapper.cc +++ b/src/yb/yql/pggate/webserver/pgsql_webserver_wrapper.cc @@ -202,8 +202,8 @@ void emitYsqlConnectionManagerMetrics(PrometheusWriter *pwriter) { for (ConnectionStats stats : stats_list) { ysql_conn_mgr_metrics.push_back({"ysql_conn_mgr_active_clients", stats.active_clients}); ysql_conn_mgr_metrics.push_back({"ysql_conn_mgr_queued_clients", stats.queued_clients}); - ysql_conn_mgr_metrics.push_back({"ysql_conn_mgr_idle_or_pending_clients", - stats.idle_or_pending_clients}); + ysql_conn_mgr_metrics.push_back({"ysql_conn_mgr_waiting_clients", + stats.waiting_clients}); ysql_conn_mgr_metrics.push_back({"ysql_conn_mgr_active_servers", stats.active_servers}); ysql_conn_mgr_metrics.push_back({"ysql_conn_mgr_idle_servers", stats.idle_servers}); ysql_conn_mgr_metrics.push_back({"ysql_conn_mgr_query_rate", stats.query_rate}); @@ -478,8 +478,8 @@ static void PgLogicalRpczHandler(const Webserver::WebRequest &req, Webserver::We // Number of logical connections which are either idle (i.e. no ongoing transaction) or waiting // for the worker thread to be processed (i.e. waiting for od_router_attach to be called). - writer.String("idle_or_pending_logical_connections"); - writer.Int64(stat.idle_or_pending_clients); + writer.String("waiting_logical_connections"); + writer.Int64(stat.waiting_clients); // Number of physical connections which currently attached to a logical connection. writer.String("active_physical_connections"); diff --git a/src/yb/yql/ysql_conn_mgr_wrapper/ysql_conn_mgr_stats.h b/src/yb/yql/ysql_conn_mgr_wrapper/ysql_conn_mgr_stats.h index 36ba731777c3..45208f0c3beb 100644 --- a/src/yb/yql/ysql_conn_mgr_wrapper/ysql_conn_mgr_stats.h +++ b/src/yb/yql/ysql_conn_mgr_wrapper/ysql_conn_mgr_stats.h @@ -29,7 +29,7 @@ struct ConnectionStats { uint64_t active_clients; uint64_t queued_clients; - uint64_t idle_or_pending_clients; + uint64_t waiting_clients; uint64_t active_servers; uint64_t idle_servers; uint64_t query_rate; diff --git a/yugabyted-ui/apiserver/cmd/server/.docs/api/openapi.yaml b/yugabyted-ui/apiserver/cmd/server/.docs/api/openapi.yaml index bd6251340ab7..0444bbe45902 100644 --- a/yugabyted-ui/apiserver/cmd/server/.docs/api/openapi.yaml +++ b/yugabyted-ui/apiserver/cmd/server/.docs/api/openapi.yaml @@ -2615,7 +2615,7 @@ components: queued_logical_connections: format: int64 type: integer - idle_or_pending_logical_connections: + waiting_logical_connections: format: int64 type: integer active_physical_connections: @@ -2637,7 +2637,7 @@ components: - active_logical_connections - active_physical_connections - avg_wait_time_ns - - idle_or_pending_logical_connections + - waiting_logical_connections - idle_physical_connections - qps - queued_logical_connections diff --git a/yugabyted-ui/apiserver/cmd/server/handlers/api_cluster_info.go b/yugabyted-ui/apiserver/cmd/server/handlers/api_cluster_info.go index fa5bb74be09b..6362283bb710 100644 --- a/yugabyted-ui/apiserver/cmd/server/handlers/api_cluster_info.go +++ b/yugabyted-ui/apiserver/cmd/server/handlers/api_cluster_info.go @@ -1722,8 +1722,7 @@ func (c *Container) GetClusterConnections(ctx echo.Context) error { UserName: connectionPool.UserName, ActiveLogicalConnections: connectionPool.ActiveLogicalConnections, QueuedLogicalConnections: connectionPool.QueuedLogicalConnections, - IdleOrPendingLogicalConnections: - connectionPool.IdleOrPendingLogicalConnections, + WaitingLogicalConnections: connectionPool.WaitingLogicalConnections, ActivePhysicalConnections: connectionPool.ActivePhysicalConnections, IdlePhysicalConnections: connectionPool.IdlePhysicalConnections, AvgWaitTimeNs: connectionPool.AvgWaitTimeNs, diff --git a/yugabyted-ui/apiserver/cmd/server/helpers/connections_http_request.go b/yugabyted-ui/apiserver/cmd/server/helpers/connections_http_request.go index b4d24ecc6a2c..7a1d7df052bc 100644 --- a/yugabyted-ui/apiserver/cmd/server/helpers/connections_http_request.go +++ b/yugabyted-ui/apiserver/cmd/server/helpers/connections_http_request.go @@ -13,7 +13,7 @@ type ConnectionPool struct { UserName string `json:"user_name"` ActiveLogicalConnections int64 `json:"active_logical_connections"` QueuedLogicalConnections int64 `json:"queued_logical_connections"` - IdleOrPendingLogicalConnections int64 `json:"idle_or_pending_logical_connections"` + WaitingLogicalConnections int64 `json:"waiting_logical_connections"` ActivePhysicalConnections int64 `json:"active_physical_connections"` IdlePhysicalConnections int64 `json:"idle_physical_connections"` AvgWaitTimeNs int64 `json:"avg_wait_time_ns"` diff --git a/yugabyted-ui/apiserver/cmd/server/models/model_connection_stats_item.go b/yugabyted-ui/apiserver/cmd/server/models/model_connection_stats_item.go index 6c4b8928acf3..c37334a03aea 100644 --- a/yugabyted-ui/apiserver/cmd/server/models/model_connection_stats_item.go +++ b/yugabyted-ui/apiserver/cmd/server/models/model_connection_stats_item.go @@ -10,7 +10,7 @@ type ConnectionStatsItem struct { QueuedLogicalConnections int64 `json:"queued_logical_connections"` - IdleOrPendingLogicalConnections int64 `json:"idle_or_pending_logical_connections"` + WaitingLogicalConnections int64 `json:"waiting_logical_connections"` ActivePhysicalConnections int64 `json:"active_physical_connections"` diff --git a/yugabyted-ui/apiserver/conf/openapi.yml b/yugabyted-ui/apiserver/conf/openapi.yml index e5066d56eabd..e02417c9ba65 100644 --- a/yugabyted-ui/apiserver/conf/openapi.yml +++ b/yugabyted-ui/apiserver/conf/openapi.yml @@ -1570,7 +1570,7 @@ components: queued_logical_connections: type: integer format: int64 - idle_or_pending_logical_connections: + waiting_logical_connections: type: integer format: int64 active_physical_connections: @@ -1591,7 +1591,7 @@ components: required: - active_logical_connections - queued_logical_connections - - idle_or_pending_logical_connections + - waiting_logical_connections - active_physical_connections - idle_physical_connections - avg_wait_time_ns diff --git a/yugabyted-ui/apiserver/conf/openapi/schemas/_index.yaml b/yugabyted-ui/apiserver/conf/openapi/schemas/_index.yaml index cee43f5151c9..f51590fe1173 100644 --- a/yugabyted-ui/apiserver/conf/openapi/schemas/_index.yaml +++ b/yugabyted-ui/apiserver/conf/openapi/schemas/_index.yaml @@ -1176,7 +1176,7 @@ ConnectionStatsItem: queued_logical_connections: type: integer format: int64 - idle_or_pending_logical_connections: + waiting_logical_connections: type: integer format: int64 active_physical_connections: @@ -1197,7 +1197,7 @@ ConnectionStatsItem: required: - active_logical_connections - queued_logical_connections - - idle_or_pending_logical_connections + - waiting_logical_connections - active_physical_connections - idle_physical_connections - avg_wait_time_ns diff --git a/yugabyted-ui/ui/src/api/src/models/ConnectionStats.ts b/yugabyted-ui/ui/src/api/src/models/ConnectionStats.ts index e00f204aaf36..9b88e262e9b0 100644 --- a/yugabyted-ui/ui/src/api/src/models/ConnectionStats.ts +++ b/yugabyted-ui/ui/src/api/src/models/ConnectionStats.ts @@ -37,7 +37,7 @@ export interface ConnectionStats { * @type {number} * @memberof ConnectionStats */ - idle_or_pending_logical_connections: number; + waiting_logical_connections: number; /** * * @type {number} diff --git a/yugabyted-ui/ui/src/api/src/models/ConnectionStatsItem.ts b/yugabyted-ui/ui/src/api/src/models/ConnectionStatsItem.ts index e0b5520d7af0..735b1979921d 100644 --- a/yugabyted-ui/ui/src/api/src/models/ConnectionStatsItem.ts +++ b/yugabyted-ui/ui/src/api/src/models/ConnectionStatsItem.ts @@ -49,7 +49,7 @@ export interface ConnectionStatsItem { * @type {number} * @memberof ConnectionStatsItem */ - idle_or_pending_logical_connections: number; + waiting_logical_connections: number; /** * * @type {number}