Conversation
|
RMV with
As example, reading from table in |
|
|
|
Test |
|
Test Retry count isn't changed: Only one error in logs: |
There was a problem hiding this comment.
Hi, thanks for testing, sorry I'm taking forever to respond.
Rebased onto #60669 and pushed some small fixes. Bigger fixes are needed if this will run in CI, see inline comments (some tests look flaky; too many parameter combinations; scheduling model doesn't match RMV behavior).
RMV with APPEND and AS SELECT query which doesn't read data from table SELECT now() AS a, number AS b FROM numbers(2) throws error There is no query or query context has expired. (THERE_IS_NO_QUERY)
Fixed by #60669
SYSTEM TEST VIEW test_rmv SET FAKE TIME doesn't work when OFFSET or RANDOMIZE is used in the RMV interval, so I can't test scheduling correctness when they are used.
What were the queries and errors? I tried this and everything worked (with and without #60669):
create materialized view a refresh every 1 minute offset 30 second (x Int64) engine Memory as select number as x from numbers(2);
system test view a set fake time '2025-01-01 00:00:00';
[wait a second]
select * from system.view_refreshes;
drop table a;
create materialized view a refresh every 1 minute randomize for 10 second (x Int64) engine Memory as select number as x from numbers(2);
system test view a set fake time '2025-01-01 00:00:00';
[wait a second]
select * from system.view_refreshes;
select * from a;
Test test_refreshable_mat_view/test.py::test_long_query verify that progress in system.view_refreshes works correctly for long running queries.
It works correctly for query SELECT toDateTime(1) a, 1 b FROM numbers(1000000000), but always inf when reading from the table: SELECT * FROM src1
EDIT: Fix in #69234
Test test_refreshable_mat_view/test.py::test_query_retry checks setting refresh_retries=10 which should retry failed query 10 times and seems that retries doesn't work.
Repro:
That's because the fake time stands still. The first retry gets scheduled for 100ms later, and happens if you advance fake time by a second:
[...already advanced fake time twice...]
:) select retry from system.view_refreshes
SELECT retry
FROM system.view_refreshes
Query id: abdce691-15dc-4e67-ac6f-9138964b2a2b
┌─retry─┐
1. │ 3 │
└───────┘
1 row in set. Elapsed: 0.016 sec.
:) SYSTEM TEST VIEW test_rmv SET FAKE TIME '2025-01-01 00:00:03'
SYSTEM TEST VIEW test_rmv SET FAKE TIME '2025-01-01 00:00:03'
Query id: d3013479-e434-4170-9dba-55e529376aed
Ok.
0 rows in set. Elapsed: 0.005 sec.
:) select retry from system.view_refreshes
SELECT retry
FROM system.view_refreshes
Query id: 84700a7e-2e8d-4853-82fd-498a56c600c6
┌─retry─┐
1. │ 4 │
└───────┘
1 row in set. Elapsed: 0.012 sec.
:) SYSTEM TEST VIEW test_rmv SET FAKE TIME '2025-01-01 00:00:04'
SYSTEM TEST VIEW test_rmv SET FAKE TIME '2025-01-01 00:00:04'
Query id: 3abf1bed-577d-455e-b7be-1ef17b19f4ed
Ok.
0 rows in set. Elapsed: 0.004 sec.
:) select retry from system.view_refreshes
SELECT retry
FROM system.view_refreshes
Query id: 43e90ec0-88d1-441c-80e9-078364e3416f
┌─retry─┐
1. │ 5 │
└───────┘
1 row in set. Elapsed: 0.015 sec.
|
This is an automated comment for commit eb42bbb with description of existing statuses. It's updated for the latest CI running ❌ Click here to open a full report in a separate page
Successful checks
|
|
Dear @al13n321, this PR hasn't been updated for a while. You will be unassigned. Will you continue working on it? If so, please feel free to reassign yourself. |
ceb3728 to
effc0f0
Compare
|
Thanks for review @al13n321
No bugs have found, feature is BULLETPROOF! |
455a22d to
abacd63
Compare
f96e6d4 to
3c40263
Compare
This test suite covers #58934 with tests. Some bugs were found, they are described in comments to this PR.
Changelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes to CHANGELOG.md):
...
Documentation entry for user-facing changes
CI Settings (Only check the boxes if you know what you are doing):