mirror of https://github.com/citusdata/citus.git
Fix a flaky behaviour in shared_connection_stats
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/5083/head
parent
4aff833ca8
commit
3584fa11b0
|
@ -226,10 +226,11 @@ COMMIT;
|
||||||
-- now, some of the optional connections would be skipped,
|
-- now, some of the optional connections would be skipped,
|
||||||
-- and only 5 connections are used per node
|
-- and only 5 connections are used per node
|
||||||
BEGIN;
|
BEGIN;
|
||||||
SELECT count(*), pg_sleep(0.1) FROM test;
|
SET LOCAL citus.max_adaptive_executor_pool_size TO 16;
|
||||||
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)
|
(1 row)
|
||||||
|
|
||||||
SELECT
|
SELECT
|
||||||
|
|
|
@ -148,7 +148,8 @@ COMMIT;
|
||||||
-- now, some of the optional connections would be skipped,
|
-- now, some of the optional connections would be skipped,
|
||||||
-- and only 5 connections are used per node
|
-- and only 5 connections are used per node
|
||||||
BEGIN;
|
BEGIN;
|
||||||
SELECT count(*), pg_sleep(0.1) FROM test;
|
SET LOCAL citus.max_adaptive_executor_pool_size TO 16;
|
||||||
|
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