Fix a flaky behaviour in shared_connection_stats (#4596)

With the previous query, we were not pushing down the pg_sleep hence the
number of connections to a worker could be different from run to run.
pull/4591/head^2
SaitTalhaNisanci 2021-01-28 18:42:49 +03:00 committed by GitHub
parent 34ccae8478
commit 1ba399f5ca
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 4 deletions

View File

@ -227,10 +227,10 @@ COMMIT;
-- and only 5 connections are used per node
BEGIN;
SET LOCAL citus.max_adaptive_executor_pool_size TO 16;
SELECT count(*), pg_sleep(0.1) FROM test;
count | pg_sleep
with cte_1 as (select pg_sleep(0.1) is null, a from test) SELECT a from cte_1 ORDER By 1 LIMIT 1;
a
---------------------------------------------------------------------
101 |
0
(1 row)
SELECT

View File

@ -149,7 +149,7 @@ COMMIT;
-- and only 5 connections are used per node
BEGIN;
SET LOCAL citus.max_adaptive_executor_pool_size TO 16;
SELECT count(*), pg_sleep(0.1) FROM test;
with cte_1 as (select pg_sleep(0.1) is null, a from test) SELECT a from cte_1 ORDER By 1 LIMIT 1;
SELECT
connection_count_to_node
FROM