Merge pull request #69416 from ClickHouse/logs-export-improvement

Hide exported logs statements in GH logs
This commit is contained in:
Mikhail f. Shiryaev 2024-09-10 19:19:47 +02:00 committed by GitHub
commit d093dd2c71
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -124,6 +124,8 @@ function setup_logs_replication
check_logs_credentials || return 0 check_logs_credentials || return 0
__set_connection_args __set_connection_args
echo "My hostname is ${HOSTNAME}"
echo 'Create all configured system logs' echo 'Create all configured system logs'
clickhouse-client --query "SYSTEM FLUSH LOGS" clickhouse-client --query "SYSTEM FLUSH LOGS"
@ -184,7 +186,12 @@ function setup_logs_replication
/^TTL /d /^TTL /d
') ')
echo -e "Creating remote destination table ${table}_${hash} with statement:\n${statement}" >&2 echo -e "Creating remote destination table ${table}_${hash} with statement:" >&2
echo "::group::${table}"
# there's the only way big "$statement" can be printed without causing EAGAIN error
# cat: write error: Resource temporarily unavailable
echo "$statement" | cat
echo "::endgroup::"
echo "$statement" | clickhouse-client --database_replicated_initial_query_timeout_sec=10 \ echo "$statement" | clickhouse-client --database_replicated_initial_query_timeout_sec=10 \
--distributed_ddl_task_timeout=30 --distributed_ddl_output_mode=throw_only_active \ --distributed_ddl_task_timeout=30 --distributed_ddl_output_mode=throw_only_active \