mirror of https://github.com/citusdata/citus.git
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
parent
34ccae8478
commit
1ba399f5ca
|
@ -227,10 +227,10 @@ COMMIT;
|
||||||
-- and only 5 connections are used per node
|
-- and only 5 connections are used per node
|
||||||
BEGIN;
|
BEGIN;
|
||||||
SET LOCAL citus.max_adaptive_executor_pool_size TO 16;
|
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;
|
||||||
count | pg_sleep
|
a
|
||||||
---------------------------------------------------------------------
|
---------------------------------------------------------------------
|
||||||
101 |
|
0
|
||||||
(1 row)
|
(1 row)
|
||||||
|
|
||||||
SELECT
|
SELECT
|
||||||
|
|
|
@ -149,7 +149,7 @@ COMMIT;
|
||||||
-- and only 5 connections are used per node
|
-- and only 5 connections are used per node
|
||||||
BEGIN;
|
BEGIN;
|
||||||
SET LOCAL citus.max_adaptive_executor_pool_size TO 16;
|
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
|
SELECT
|
||||||
connection_count_to_node
|
connection_count_to_node
|
||||||
FROM
|
FROM
|
||||||
|
|
Loading…
Reference in New Issue