Skip to content

Commit

Permalink
test: refine root cause identification test of recovery (#16431)
Browse files Browse the repository at this point in the history
Signed-off-by: Bugen Zhao <[email protected]>
  • Loading branch information
BugenZhao authored Apr 22, 2024
1 parent 29fb42a commit 2a11205
Showing 1 changed file with 15 additions and 9 deletions.
24 changes: 15 additions & 9 deletions e2e_test/error_ui/simple/recovery.slt
Original file line number Diff line number Diff line change
Expand Up @@ -12,19 +12,25 @@ statement ok
insert into t values (1);

# Wait for recovery to complete.
sleep 10s
sleep 15s

# Check that there's a log entry for barrier collection failure on the mata node.
# The message should contain the root cause of the failure: "Division by zero".
# Extract the message to check that it contains the root cause of the failure.
query T
select info::varchar like
'%Actor % exited unexpectedly: Executor error: Chunk operation error: Division by zero%'
from rw_catalog.rw_event_logs
where event_type = 'COLLECT_BARRIER_FAIL'
order by timestamp desc
limit 1;
with error as (
select info->'collectBarrierFail'->'error' #>> '{}' as error
from rw_catalog.rw_event_logs
where event_type = 'COLLECT_BARRIER_FAIL'
order by timestamp desc
limit 1
)
select
case when error like '%Actor % exited unexpectedly: Executor error: Chunk operation error: Division by zero%' then 'ok'
else error
end as result
from error;
----
t
ok

statement ok
drop table t cascade;

0 comments on commit 2a11205

Please sign in to comment.