From 33e77ca69ae2880b69d08004ce1e1b69258933a9 Mon Sep 17 00:00:00 2001 From: Ping Yu Date: Sun, 11 Feb 2024 18:15:53 +0800 Subject: [PATCH] collect pprof heap Signed-off-by: Ping Yu --- cdc/tests/integration_tests/flow_control/run.sh | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/cdc/tests/integration_tests/flow_control/run.sh b/cdc/tests/integration_tests/flow_control/run.sh index a434e021..838c04b7 100644 --- a/cdc/tests/integration_tests/flow_control/run.sh +++ b/cdc/tests/integration_tests/flow_control/run.sh @@ -49,7 +49,7 @@ EOF # Wait until cdc pulls the data from tikv and store it in soter sleep 90 - rss1=$(ps -aux | grep 'tikv-cdc' | head -n1 | awk '{print $6}') + rss1=$(ps -aux | grep 'tikv-cdc' | grep -v grep | head -n1 | awk '{print $6}') if [[ $rss1 == "" ]]; then echo "Failed to get rrs1 by ps" exit 1 @@ -61,12 +61,9 @@ EOF echo "cdc server used memory: $used" if [ $used -gt $expected ]; then echo "Maybe flow-contorl is not working" - - if [ "$SINK_TYPE" != "kafka" ]; then - # Kafka sink may have memory leak. - # TODO: investigate why. - exit 1 - fi + # CI only collect *.log files, so name it as heap-dump.log + curl http://127.0.0.1:8600/debug/pprof/heap >$WORK_DIR/heap-dump.log + exit 1 fi # As "per-changefeed-memory-quota" is low the syncing will cost more time.