timescale / timescaledb

An open-source time-series SQL database optimized for fast ingest and complex queries. Packaged as a PostgreSQL extension.
https://www.timescale.com/
Other
16.89k stars 853 forks source link

[Flaky test] Statement canceled in reorder_vs_insert #5223

Open mkindahl opened 1 year ago

mkindahl commented 1 year ago

Which test is flaky?

reorder_vs_insert

Since when has the test been flaky?

January 26, 2023

Link to the failed test run

https://github.com/timescale/timescaledb/actions/runs/4013416890/jobs/6892735162

Log output

diff -u /__w/timescaledb/timescaledb/tsl/test/isolation/expected/reorder_vs_insert.out /__w/timescaledb/timescaledb/build/tsl/test/isolation/results/reorder_vs_insert.out
--- /__w/timescaledb/timescaledb/tsl/test/isolation/expected/reorder_vs_insert.out  2023-01-26 08:24:24.437592675 +0000
+++ /__w/timescaledb/timescaledb/build/tsl/test/isolation/results/reorder_vs_insert.out 2023-01-26 08:27:15.205339364 +0000
@@ -77,6 +77,7 @@
 step R1: SELECT reorder_chunk_i((SELECT show_chunks('ts_reorder_test') LIMIT 1), 'ts_reorder_test_time_idx', wait_on => 'waiter'); <waiting ...>
 step I1: INSERT INTO ts_reorder_test VALUES (1, 19.5, 3); <waiting ...>
 step I1: <... completed>
+ERROR:  canceling statement due to lock timeout
 step R1: <... completed>
 ERROR:  canceling statement due to lock timeout
 step Ic: COMMIT;

Reason for flakiness

Seems to be a long-running test that is blocking for a long time. Not having the test waiting for locks to timeout is probably a good way to avoid the flakiness.

mkindahl commented 2 months ago

Another failure: https://github.com/timescale/timescaledb-private/actions/runs/9060316219/job/24889786361?pr=1096