mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-09-19 16:20:50 +00:00
Merge pull request #69483 from ClickHouse/logs-export-improvement
Another attempt to address EAGAIN "Resource unavailable"
This commit is contained in:
commit
22f389d415
@ -187,10 +187,15 @@ function setup_logs_replication
|
|||||||
')
|
')
|
||||||
|
|
||||||
echo -e "Creating remote destination table ${table}_${hash} with statement:" >&2
|
echo -e "Creating remote destination table ${table}_${hash} with statement:" >&2
|
||||||
|
|
||||||
echo "::group::${table}"
|
echo "::group::${table}"
|
||||||
# there's the only way big "$statement" can be printed without causing EAGAIN error
|
# there's the only way big "$statement" can be printed without causing EAGAIN error
|
||||||
# cat: write error: Resource temporarily unavailable
|
# cat: write error: Resource temporarily unavailable
|
||||||
echo "$statement" | cat
|
statement_print="${statement}"
|
||||||
|
if [ "${#statement_print}" -gt 4000 ]; then
|
||||||
|
statement_print="${statement::1999}\n…\n${statement:${#statement}-1999}"
|
||||||
|
fi
|
||||||
|
echo -e "$statement_print"
|
||||||
echo "::endgroup::"
|
echo "::endgroup::"
|
||||||
|
|
||||||
echo "$statement" | clickhouse-client --database_replicated_initial_query_timeout_sec=10 \
|
echo "$statement" | clickhouse-client --database_replicated_initial_query_timeout_sec=10 \
|
||||||
|
Loading…
Reference in New Issue
Block a user