diff --git a/src/test/regress/expected/failure_insert_select_repartition.out b/src/test/regress/expected/failure_insert_select_repartition.out index c634cfff8..8ad740e45 100644 --- a/src/test/regress/expected/failure_insert_select_repartition.out +++ b/src/test/regress/expected/failure_insert_select_repartition.out @@ -89,36 +89,46 @@ SELECT * FROM target_table ORDER BY a; (10 rows) -- --- kill fetch_intermediate_results +-- kill the COPY command that's created by fetch_intermediate_results -- this fails the fetch into target, so source replication doesn't matter -- and both should fail +-- We don't kill the fetch_intermediate_results query directly, because that +-- resulted in randomly failing tests on CI. The reason for that is that there +-- is a race condition, where killing the fetch_intermediate_results query +-- removes the data files before the fetch_intermediate_results query from the +-- other node can read them. In theory a similar race condition still exists +-- when killing the COPY, but CI doesn't hit that race condition in practice. -- TRUNCATE target_table; -SELECT citus.mitmproxy('conn.onQuery(query="fetch_intermediate_results").kill()'); +SELECT citus.mitmproxy('conn.onQuery(query="COPY").kill()'); mitmproxy --------------------------------------------------------------------- (1 row) INSERT INTO target_table SELECT * FROM source_table; -ERROR: connection to the remote node localhost:xxxxx failed with the following error: server closed the connection unexpectedly +ERROR: server closed the connection unexpectedly This probably means the server terminated abnormally before or while processing the request. +CONTEXT: while executing command on localhost:xxxxx +while executing command on localhost:xxxxx SELECT * FROM target_table ORDER BY a; a | b --------------------------------------------------------------------- (0 rows) -SELECT citus.mitmproxy('conn.onQuery(query="fetch_intermediate_results").kill()'); +SELECT citus.mitmproxy('conn.onQuery(query="COPY").kill()'); mitmproxy --------------------------------------------------------------------- (1 row) INSERT INTO target_table SELECT * FROM replicated_source_table; -ERROR: connection to the remote node localhost:xxxxx failed with the following error: server closed the connection unexpectedly +ERROR: server closed the connection unexpectedly This probably means the server terminated abnormally before or while processing the request. +CONTEXT: while executing command on localhost:xxxxx +while executing command on localhost:xxxxx SELECT * FROM target_table ORDER BY a; a | b --------------------------------------------------------------------- diff --git a/src/test/regress/sql/failure_insert_select_repartition.sql b/src/test/regress/sql/failure_insert_select_repartition.sql index 0c65c2529..d61fbe9df 100644 --- a/src/test/regress/sql/failure_insert_select_repartition.sql +++ b/src/test/regress/sql/failure_insert_select_repartition.sql @@ -47,19 +47,25 @@ INSERT INTO target_table SELECT * FROM replicated_source_table; SELECT * FROM target_table ORDER BY a; -- --- kill fetch_intermediate_results +-- kill the COPY command that's created by fetch_intermediate_results -- this fails the fetch into target, so source replication doesn't matter -- and both should fail +-- We don't kill the fetch_intermediate_results query directly, because that +-- resulted in randomly failing tests on CI. The reason for that is that there +-- is a race condition, where killing the fetch_intermediate_results query +-- removes the data files before the fetch_intermediate_results query from the +-- other node can read them. In theory a similar race condition still exists +-- when killing the COPY, but CI doesn't hit that race condition in practice. -- TRUNCATE target_table; -SELECT citus.mitmproxy('conn.onQuery(query="fetch_intermediate_results").kill()'); +SELECT citus.mitmproxy('conn.onQuery(query="COPY").kill()'); INSERT INTO target_table SELECT * FROM source_table; SELECT * FROM target_table ORDER BY a; -SELECT citus.mitmproxy('conn.onQuery(query="fetch_intermediate_results").kill()'); +SELECT citus.mitmproxy('conn.onQuery(query="COPY").kill()'); INSERT INTO target_table SELECT * FROM replicated_source_table; SELECT * FROM target_table ORDER BY a;