Skip to content

Commit 4baea3a

Browse files
authored
Merge pull request ClickHouse#78266 from azat/ci/better-ci-logs-sender
ci: fix hangs during sending system.*_log to ci-logs
2 parents 8e71b56 + 2349a12 commit 4baea3a

File tree

3 files changed

+21
-3
lines changed

3 files changed

+21
-3
lines changed

docker/test/base/setup_export_logs.sh

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -201,9 +201,11 @@ function setup_logs_replication
201201
echo "Creating materialized view system.${table}_watcher" >&2
202202

203203
clickhouse-client --query "
204-
CREATE MATERIALIZED VIEW system.${table}_watcher TO system.${table}_sender AS
205-
SELECT ${EXTRA_COLUMNS_EXPRESSION_FOR_TABLE}, *
206-
FROM system.${table}
204+
CREATE MATERIALIZED VIEW system.${table}_watcher
205+
TO system.${table}_sender
206+
DEFINER = ci_logs_sender
207+
AS
208+
SELECT ${EXTRA_COLUMNS_EXPRESSION_FOR_TABLE}, * FROM system.${table}
207209
" || continue
208210
done
209211
)

tests/config/install.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,7 @@ fi
9595

9696
ln -sf $SRC_PATH/users.d/log_queries.xml $DEST_SERVER_PATH/users.d/
9797
ln -sf $SRC_PATH/users.d/readonly.xml $DEST_SERVER_PATH/users.d/
98+
ln -sf $SRC_PATH/users.d/ci_logs_sender.yaml $DEST_SERVER_PATH/users.d/
9899
ln -sf $SRC_PATH/users.d/access_management.xml $DEST_SERVER_PATH/users.d/
99100
ln -sf $SRC_PATH/users.d/database_atomic_drop_detach_sync.xml $DEST_SERVER_PATH/users.d/
100101
ln -sf $SRC_PATH/users.d/opentelemetry.xml $DEST_SERVER_PATH/users.d/
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
profiles:
2+
ci_logs_sender:
3+
# The async sends will block the table shutdown for the timeout,
4+
# and default timeout of 300 seconds is too big and may lead to hangs,
5+
# the INSERTs will be retried anyway
6+
send_timeout: 15
7+
receive_timeout: 15
8+
users:
9+
ci_logs_sender:
10+
profile: ci_logs_sender
11+
no_password: true
12+
networks:
13+
ip:
14+
- ::1
15+
- 127.0.0.1

0 commit comments

Comments
 (0)