mirror of https://github.com/citusdata/citus.git
Fix flakyness in columnar_memory test (#6216)
Sometimes in CI the columnar_memory test was using slightly more memory than expected. ```diff SELECT CASE WHEN 1.0 * TopMemoryContext / :top_post BETWEEN 0.98 AND 1.02 THEN 1 ELSE 1.0 * TopMemoryContext / :top_post END AS top_growth FROM columnar_test_helpers.columnar_store_memory_stats(); --[ RECORD 1 ]- -top_growth | 1 +-[ RECORD 1 ]------------------ +top_growth | 1.0206132116232119 -- before this change, max mem usage while executing inserts was 28MB and ``` This PR changes the expectation to be slightly higher, such that this random increase in memory usage doesn't cause a flaky test. Failing test: https://app.circleci.com/pipelines/github/citusdata/citus/26256/workflows/c0870f66-3346-4f8d-a1d3-36dfd7c98289/jobs/743028pull/6217/head
parent
de475feb69
commit
4ce17f015b
|
@ -71,7 +71,7 @@ write_clear_outside_xact | t
|
||||||
INSERT INTO t
|
INSERT INTO t
|
||||||
SELECT i, 'last batch', 0 /* no need to record memusage per row */
|
SELECT i, 'last batch', 0 /* no need to record memusage per row */
|
||||||
FROM generate_series(1, 50000) i;
|
FROM generate_series(1, 50000) i;
|
||||||
SELECT CASE WHEN 1.0 * TopMemoryContext / :top_post BETWEEN 0.98 AND 1.02 THEN 1 ELSE 1.0 * TopMemoryContext / :top_post END AS top_growth
|
SELECT CASE WHEN 1.0 * TopMemoryContext / :top_post BETWEEN 0.98 AND 1.03 THEN 1 ELSE 1.0 * TopMemoryContext / :top_post END AS top_growth
|
||||||
FROM columnar_test_helpers.columnar_store_memory_stats();
|
FROM columnar_test_helpers.columnar_store_memory_stats();
|
||||||
-[ RECORD 1 ]-
|
-[ RECORD 1 ]-
|
||||||
top_growth | 1
|
top_growth | 1
|
||||||
|
|
|
@ -73,7 +73,7 @@ INSERT INTO t
|
||||||
SELECT i, 'last batch', 0 /* no need to record memusage per row */
|
SELECT i, 'last batch', 0 /* no need to record memusage per row */
|
||||||
FROM generate_series(1, 50000) i;
|
FROM generate_series(1, 50000) i;
|
||||||
|
|
||||||
SELECT CASE WHEN 1.0 * TopMemoryContext / :top_post BETWEEN 0.98 AND 1.02 THEN 1 ELSE 1.0 * TopMemoryContext / :top_post END AS top_growth
|
SELECT CASE WHEN 1.0 * TopMemoryContext / :top_post BETWEEN 0.98 AND 1.03 THEN 1 ELSE 1.0 * TopMemoryContext / :top_post END AS top_growth
|
||||||
FROM columnar_test_helpers.columnar_store_memory_stats();
|
FROM columnar_test_helpers.columnar_store_memory_stats();
|
||||||
|
|
||||||
-- before this change, max mem usage while executing inserts was 28MB and
|
-- before this change, max mem usage while executing inserts was 28MB and
|
||||||
|
|
Loading…
Reference in New Issue