fix(deploy): cdc_resnapshot 清空 rwa_auth 的 processed_cdc_events

cdc_resnapshot 之前只清空 rwa_contribution 的幂等表,遗漏了 rwa_auth,
导致 wallet address CDC 重新快照后消息被幂等检查跳过,KAVA 地址无法重新同步。

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
hailin 2026-01-29 14:24:59 -08:00
parent f2b83650b5
commit 5dc37e24d2
1 changed files with 8 additions and 6 deletions

View File

@ -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..."