Skip to content

Commit 713720b

Browse files
committed
add debug
1 parent ffd3919 commit 713720b

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

scripts/ci/ci-run-sqllogic-tests-cluster.sh

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,26 @@ export STORAGE_ALLOW_INSECURE=true
99
echo "Starting Cluster databend-query"
1010
./scripts/ci/deploy/databend-query-cluster-3-nodes.sh
1111

12+
ASYNC_TASKS_DUMP_OUTPUT=${ASYNC_TASKS_DUMP_OUTPUT:-"./.databend/async_tasks_dump.log"}
13+
ASYNC_TASKS_DUMP_INTERVAL=${ASYNC_TASKS_DUMP_INTERVAL:-1}
14+
ASYNC_TASKS_DUMP_ENDPOINTS=${ASYNC_TASKS_DUMP_ENDPOINTS:-"http://127.0.0.1:8080/debug/async_tasks/dump,http://127.0.0.1:8082/debug/async_tasks/dump,http://127.0.0.1:8083/debug/async_tasks/dump"}
15+
16+
echo "Starting async tasks dump collector"
17+
bash ./scripts/ci/ci-collect-async-tasks-dump.sh \
18+
"${ASYNC_TASKS_DUMP_OUTPUT}" \
19+
"${ASYNC_TASKS_DUMP_INTERVAL}" \
20+
"${ASYNC_TASKS_DUMP_ENDPOINTS}" &
21+
ASYNC_TASKS_DUMP_PID=$!
22+
23+
cleanup_async_tasks_dump_collector() {
24+
if [ -n "${ASYNC_TASKS_DUMP_PID:-}" ] && kill -0 "${ASYNC_TASKS_DUMP_PID}" 2>/dev/null; then
25+
echo "Stopping async tasks dump collector"
26+
kill "${ASYNC_TASKS_DUMP_PID}" 2>/dev/null || true
27+
wait "${ASYNC_TASKS_DUMP_PID}" 2>/dev/null || true
28+
fi
29+
}
30+
trap cleanup_async_tasks_dump_collector EXIT
31+
1232
export RUST_BACKTRACE=1
1333

1434
TEST_HANDLERS=${TEST_HANDLERS:-"mysql,http"}

0 commit comments

Comments
 (0)