timescaledb
timescaledb copied to clipboard
Fix flaky dist_api_calls test
The ts_dist_cmd_invoke_on_data_nodes_using_search_path() function cannot assume that ts_dist_cmd_invoke_on_data_nodes() function will return the SAME connection to any given DN across successive calls. A cache invalidation in the middle can cause another connection to be returned. This can cause unexpected errors.
We now fetch a list of connections to the specific datanodes in this function and re-use the same ones till the end of the function for all subsequent commands.
Fixes #4022
Codecov Report
Merging #4689 (9c2a430) into main (a26a597) will increase coverage by
0.01%
. The diff coverage is82.00%
.
@@ Coverage Diff @@
## main #4689 +/- ##
==========================================
+ Coverage 90.82% 90.83% +0.01%
==========================================
Files 224 224
Lines 42344 42391 +47
==========================================
+ Hits 38457 38507 +50
+ Misses 3887 3884 -3
Impacted Files | Coverage Δ | |
---|---|---|
tsl/src/remote/dist_commands.c | 90.76% <82.00%> (-2.19%) |
:arrow_down: |
src/bgw/job.c | 94.80% <0.00%> (+0.22%) |
:arrow_up: |
tsl/src/nodes/data_node_dispatch.c | 96.72% <0.00%> (+0.23%) |
:arrow_up: |
src/bgw/scheduler.c | 86.54% <0.00%> (+2.92%) |
:arrow_up: |
Continue to review full report at Codecov.
Legend - Click here to learn more
Δ = absolute <relative> (impact)
,ø = not affected
,? = missing data
Powered by Codecov. Last update a26a597...9c2a430. Read the comment docs.
this is being abandoned since @pmwkaa has a different approach to solve this in https://github.com/timescale/timescaledb/pull/4771