mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-24 00:22:29 +00:00
Do not overlap profile events snapshots for queries
Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
This commit is contained in:
parent
e38057ddb0
commit
097e2f626d
@ -728,6 +728,7 @@ void TCPHandler::processOrdinaryQueryWithProcessors()
|
||||
return;
|
||||
|
||||
sendData({});
|
||||
last_sent_snapshots.clear();
|
||||
}
|
||||
|
||||
sendProgress();
|
||||
|
@ -4,6 +4,9 @@ print only last (and also number of rows to provide more info in case of failure
|
||||
[ 0 ] SelectedRows: 131010 (increment)
|
||||
regression test for incorrect filtering out snapshots
|
||||
0
|
||||
regression test for overlap profile events snapshots between queries
|
||||
[ 0 ] SelectedRows: 1 (increment)
|
||||
[ 0 ] SelectedRows: 1 (increment)
|
||||
print everything
|
||||
OK
|
||||
print each 100 ms
|
||||
|
@ -14,6 +14,9 @@ echo 'regression test for incorrect filtering out snapshots'
|
||||
$CLICKHOUSE_CLIENT --print-profile-events --profile-events-delay-ms=-1 -n -q 'select 1; select 1' >& /dev/null
|
||||
echo $?
|
||||
|
||||
echo 'regression test for overlap profile events snapshots between queries'
|
||||
$CLICKHOUSE_CLIENT --print-profile-events --profile-events-delay-ms=-1 -n -q 'select 1; select 1' |& grep -F -o '[ 0 ] SelectedRows: 1 (increment)'
|
||||
|
||||
echo 'print everything'
|
||||
profile_events="$($CLICKHOUSE_CLIENT --max_block_size 1 --print-profile-events -q 'select sleep(1) from numbers(2) format Null' |& grep -c 'SelectedRows')"
|
||||
test "$profile_events" -gt 1 && echo OK || echo "FAIL ($profile_events)"
|
||||
|
Loading…
Reference in New Issue
Block a user