You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@seatunnel.apache.org by "DanielLeens (via GitHub)" <gi...@apache.org> on 2026/04/20 06:55:02 UTC

Re: [PR] [Feature][Core] Support table-level fault isolation for multi-table synchronization [seatunnel]

DanielLeens commented on PR #10600:
URL: https://github.com/apache/seatunnel/pull/10600#issuecomment-4278475185

   Hi @yzeng1618, thanks for working on this. I pulled the PR locally and reviewed the current full diff against `dev`, including the parser path, Zeta save-mode path, JDBC discovery path, and the `MultiTableSink` runtime writer path.
   
   Local branch: `seatunnel-review-10600`  
   Head reviewed: `fc671095b0f6cb3c7de36b1d18cba0832d4f953d`
   
   What this PR is trying to solve:
   
   - User pain: in a multi-table sync job, one bad table can currently fail the whole job. For example, if `db.ok_table` can be written but `db.bad_table` has an incompatible sink schema, users lose the progress of the healthy table too.
   - Fix approach: introduce `multi_table.failure_policy = CONTINUE_OTHER_TABLES`, record table-scoped failures, skip failed tables during discovery / sink creation / save mode / runtime sink writes, and let healthy tables continue.
   - In one sentence: this is a framework-level attempt to turn table-scoped failures into per-table isolation instead of whole-job failure.
   
   Runtime path checked:
   
   ```text
   Job config parsing
     -> MultipleTableJobConfigParser.parse()
         -> JDBC source discovery can call JdbcCatalogUtils.getTables(..., failurePolicy)
             -> failing table metadata/read failures are skipped only when CONTINUE_OTHER_TABLES is enabled
         -> createSinkAction(...)
             -> FactoryUtil.createAndPrepareSink(...)
             -> handleSaveMode(...) / handleSchemaSaveModeWithRestore(...)
             -> table-scoped failures are recorded as MultiTableFailedTable
         -> tryGenerateMultiTableSink(...)
             -> MultiTableFailureHelper.withFailedTables(...)
             -> FactoryUtil.createMultiTableSink(...)
   
   Zeta cluster save-mode path
     -> JobMaster / SaveModeHandler path
         -> table-scoped failures are intended to be recorded and passed forward
   
   Runtime sink write path
     -> MultiTableSink.createWriter()/restoreWriter()
         -> new MultiTableSinkWriter(..., failurePolicy, initialFailedTables)
     -> MultiTableSinkWriter.write()
         -> route SeaTunnelRow by tableId / primary key
         -> MultiTableWriterRunnable.run()
             -> sub-writer.write(row)
             -> on table-scoped failure, remove writer and record failed table
     -> checkpoint/commit/close
         -> snapshotState()/prepareCommit()/close() skip failed writers and summarize failed tables
   ```
   
   Key local findings:
   
   - The normal multi-table parser and sink runtime paths do hit this change when `multi_table.failure_policy = CONTINUE_OTHER_TABLES` is set.
   - The default remains `FAIL_FAST`, so existing jobs keep their historical behavior unless users opt in.
   - The current PR cannot be merged as-is because it conflicts with the latest `dev` branch.
   - After the conflict is resolved, the concurrent removal path in `MultiTableWriterRunnable` / `MultiTableSinkWriter` still deserves a careful follow-up check because table writer maps are mutated while runtime writer threads may read them.
   
   Local checks performed:
   
   - `git fetch upstream pull/10600/head:seatunnel-review-10600 --force`: passed.
   - `git checkout seatunnel-review-10600`: passed.
   - `git diff --stat upstream/dev...seatunnel-review-10600`: 28 files, `+1905/-153`.
   - `git merge-tree $(git merge-base upstream/dev seatunnel-review-10600) upstream/dev seatunnel-review-10600`: confirmed merge conflicts in `.github/workflows/backend.yml`, `docs/en/architecture/features/multi-table.md`, `docs/zh/architecture/features/multi-table.md`, and the new multi-table API files.
   - Source-chain inspection covered `MultipleTableJobConfigParser`, `JdbcCatalogUtils`, `MultiTableSink`, `MultiTableSinkWriter`, `MultiTableWriterRunnable`, and `MultiTableFailureHelper`.
   - Local build/tests were not run; this was a source-level review and the branch is currently conflicting with `dev`.
   - GitHub checks observed on the old run: `Build`, `Notify test workflow`, and `labeler` were successful, but those checks do not remove the current merge conflict.
   
   ## Merge conclusion
   
   ### Conclusion: not recommended to merge
   
   Blocking items:
   
   1. Merge conflict with current `dev` must be resolved first. The PR is reported as `CONFLICTING`, and local `git merge-tree` confirms conflicts in workflow/docs/API files. Until the conflict is resolved, the final code that would land in `dev` is not reviewable.
   
   Non-blocking suggestions:
   
   - After rebasing, please keep the review focused on the full current diff, especially the writer-removal path around `MultiTableSinkWriter.removeTableWriters()` and `MultiTableWriterRunnable.run()`.
   - A streaming-mode checkpoint/restore regression case would make the runtime isolation guarantee much stronger, because this PR touches writer state, prepare-commit, close, and failed-table propagation.
   
   Overall evaluation:
   
   The direction is valuable and the default behavior is backward compatible, but the PR needs to be rebased and re-reviewed from the final conflict-free diff before it can be considered for merge. Thanks again for pushing this feature forward; it is a big improvement area, just one that needs a very careful landing.
   


-- 
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: commits-unsubscribe@seatunnel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org