From 6443acf34ada421c07d6aadd414964dfdb720884 Mon Sep 17 00:00:00 2001 From: hailin Date: Sun, 1 Feb 2026 23:42:53 -0800 Subject: [PATCH] =?UTF-8?q?fix(deploy-mining):=20cdc-resnapshot=20?= =?UTF-8?q?=E6=94=AF=E6=8C=81=20standalone=20=E6=A8=A1=E5=BC=8F=E8=BF=9C?= =?UTF-8?q?=E7=A8=8B=E6=93=8D=E4=BD=9C=201.0=20Debezium?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit standalone 模式下 source CDC connectors 在 1.0 服务器 (192.168.1.111:8084), cdc-resnapshot 需要指向 1.0 Debezium 才能删除并重建 connector 触发全量快照。 Co-Authored-By: Claude Opus 4.5 --- backend/services/deploy-mining.sh | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/backend/services/deploy-mining.sh b/backend/services/deploy-mining.sh index 084024d9..8c6a6824 100755 --- a/backend/services/deploy-mining.sh +++ b/backend/services/deploy-mining.sh @@ -275,6 +275,8 @@ load_env() { export DEBEZIUM_DB_HOST="postgres-2" # MPC system 在 1.0 服务器上 export MPC_ACCOUNT_SERVICE_URL="${MPC_ACCOUNT_SERVICE_URL:-http://192.168.1.111:4000}" + # 1.0 Debezium Connect URL (source CDC connectors 在 1.0 服务器上) + DEBEZIUM_1_CONNECT_URL="${DEBEZIUM_1_CONNECT_URL:-http://192.168.1.111:8084}" POSTGRES_CONTAINER="${POSTGRES_CONTAINER:-rwa-postgres-2}" KAFKA_CONTAINER="" # Kafka is remote, no local container @@ -904,7 +906,12 @@ sync_reset() { cdc_resnapshot() { print_section "Triggering CDC Connectors Re-Snapshot" + # Source CDC connectors 在 1.0 Debezium 上 local connect_url="$DEBEZIUM_CONNECT_URL" + if [ "$DEPLOY_MODE" = "standalone" ]; then + connect_url="$DEBEZIUM_1_CONNECT_URL" + log_info "Standalone mode: targeting 1.0 Debezium at $connect_url" + fi # Check if Debezium Connect is available if ! curl -s "$connect_url" &>/dev/null; then