Apache Software Foundation / SeaTunnel
Merged upstreamTestingMerged Sep 1, 2026

Cover multi-table JDBC reconnect replay

Added an end-to-end unit regression for JDBC multi-table routing and reconnect behavior with generated sink SQL.

apache/seatunnel · #11879

Data reliability regression guard

SeaTunnel now proves active-table JDBC batches reconnect and replay exactly once without touching idle table writers.

Problem

Reconnect handling and nested SQL exception detection existed, but the reported path through two writers behind `MultiTableSinkWriter` lacked coverage for routing, statement reconstruction, and buffered-row replay.

Approach

Built a two-table test that injects an `08S01` batch failure on the active writer and verifies dialect-generated SQL, reconnect, statement rebuild, exact-once buffered replay, and zero writes or reconnects for the idle table.

Impact and scope

  • Protects recovery behavior that prevents data loss when a JDBC connection fails during a multi-table batch.
  • Guards against duplicate replay while ensuring inactive destinations are not disturbed.
  • Makes generated-SQL routing and nested communication-failure detection part of the durable regression suite.

Validation

  • The regression fails when the underlying reconnect handling is removed and passes through the focused JDBC test path.
  • Passed connector verification and the complete final Apache Build.
  • The authored commit and GitHub-verified merge credit Goutam Adwant; two upstream approvals landed the test.