mirror of
https://github.com/postgresml/pgcat.git
synced 2026-03-27 18:56:30 +00:00
Report maxwait for clients that end up not getting a connection (#596)
This commit is contained in:
@@ -720,7 +720,7 @@ impl ConnectionPool {
|
|||||||
// since we last checked the server is ok.
|
// since we last checked the server is ok.
|
||||||
// Health checks are pretty expensive.
|
// Health checks are pretty expensive.
|
||||||
if !require_healthcheck {
|
if !require_healthcheck {
|
||||||
let checkout_time: u64 = now.elapsed().as_micros() as u64;
|
let checkout_time = now.elapsed().as_micros() as u64;
|
||||||
client_stats.checkout_time(checkout_time);
|
client_stats.checkout_time(checkout_time);
|
||||||
server
|
server
|
||||||
.stats()
|
.stats()
|
||||||
@@ -734,7 +734,7 @@ impl ConnectionPool {
|
|||||||
.run_health_check(address, server, now, client_stats)
|
.run_health_check(address, server, now, client_stats)
|
||||||
.await
|
.await
|
||||||
{
|
{
|
||||||
let checkout_time: u64 = now.elapsed().as_micros() as u64;
|
let checkout_time = now.elapsed().as_micros() as u64;
|
||||||
client_stats.checkout_time(checkout_time);
|
client_stats.checkout_time(checkout_time);
|
||||||
server
|
server
|
||||||
.stats()
|
.stats()
|
||||||
@@ -746,7 +746,12 @@ impl ConnectionPool {
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
client_stats.idle();
|
client_stats.idle();
|
||||||
|
|
||||||
|
let checkout_time = now.elapsed().as_micros() as u64;
|
||||||
|
client_stats.checkout_time(checkout_time);
|
||||||
|
|
||||||
Err(Error::AllServersDown)
|
Err(Error::AllServersDown)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user