From 5dc37e24d2f1c43f853560bc6b14ad34d1e1214a Mon Sep 17 00:00:00 2001 From: hailin Date: Thu, 29 Jan 2026 14:24:59 -0800 Subject: [PATCH] =?UTF-8?q?fix(deploy):=20cdc=5Fresnapshot=20=E6=B8=85?= =?UTF-8?q?=E7=A9=BA=20rwa=5Fauth=20=E7=9A=84=20processed=5Fcdc=5Fevents?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit cdc_resnapshot 之前只清空 rwa_contribution 的幂等表,遗漏了 rwa_auth, 导致 wallet address CDC 重新快照后消息被幂等检查跳过,KAVA 地址无法重新同步。 Co-Authored-By: Claude Opus 4.5 --- backend/services/deploy-mining.sh | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/backend/services/deploy-mining.sh b/backend/services/deploy-mining.sh index defb2bb5..8fad73a6 100755 --- a/backend/services/deploy-mining.sh +++ b/backend/services/deploy-mining.sh @@ -777,13 +777,15 @@ cdc_resnapshot() { fi done - # Clear processed_cdc_events table + # Clear processed_cdc_events tables in all CDC consumer databases log_step "Clearing processed CDC events..." - if run_psql "rwa_contribution" "TRUNCATE TABLE processed_cdc_events;" 2>/dev/null; then - log_success "Truncated processed_cdc_events in rwa_contribution" - else - log_warn "Could not truncate processed_cdc_events (table may not exist)" - fi + for db in "rwa_contribution" "rwa_auth"; do + if run_psql "$db" "TRUNCATE TABLE processed_cdc_events;" 2>/dev/null; then + log_success "Truncated processed_cdc_events in $db" + else + log_warn "Could not truncate processed_cdc_events in $db (table may not exist)" + fi + done # For each CDC Postgres connector, save config, delete, and recreate log_step "Re-creating CDC Postgres connectors..."