SEPURI-SAI-KRISHNA commented on PR #13365: URL: https://github.com/apache/seatunnel/pull/13365#issuecomment-7057849923
@DanielLeens thanks, both were real and are fixed in `8a643a886f`. **1. Savepoint of another table.** Reproduced on SQLite with your sequence (A flushes, B flushes, A flushes, B's batch has a bad row): B's rollback failed with `no such savepoint: SQLITE_SAVEPOINT_2`. As you note, this predates the PR (on dev, releasing the old savepoint after taking the new one destroyed the new one and any later savepoint of another table). A commit by one table, for example its timer flush, left the other table's savepoint stale the same way. The boundary now lives in the shared `JdbcTransactionStateManager` instead of each writer: the tables of a connection use one savepoint, taken after the last good batch of any of them, and a commit, a full rollback or a replaced connection clears it for all of them. No row-error savepoint is taken after the boundary, so releasing the previous one destroys nothing still in use. The lost-work check by flush sequence stays, so a rollback over a batch that another writer flushed without moving the boundary still poisons the in terval. The timer flush of a queue runs under that queue's lock (`MultiTableSinkWriter.flushQueue`), so two tables never move the boundary at the same time. Tests (real SQLite, `JdbcMultiTableReconnectTest`): `sharedQueueBoundaryMovedByOneTableStillIsolatesTheOtherTablesRowError` is your sequence: only the bad row is routed and the good rows of both tables are committed. `sharedQueueCommitByOneTableStillIsolatesTheOtherTablesRowError` covers the commit. Both fail on `5233483f6d` with the missing-savepoint error. **2. Timer flush.** The row-error branch now commits like `prepareCommit` and `close`, and a commit failure rolls back and fails the timer action. `timerFlushCommitsTheRowsWrittenAgainAfterARowError` checks from another connection that the good row is committed when `timerFlush` returns; `timerFlushFailsWhenTheCommitAfterARowErrorFails` injects a commit failure and checks that it propagates and the next checkpoint is rejected. Both fail on the previous `timerFlush` (`expected: <[1:first]> but was: <[]>`). Docs EN/ZH (`error-handling.md` multi-table note, `incompatible-changes.md`) now describe the shared savepoint. JDK 17: connector-jdbc UT 1307 run, 0 failures, 6 skipped; `SinkErrorToMysqlIT` on Zeta 19 run, 0 failures, 1 skipped (as before). -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
