nzw921rx opened a new issue, #13223: URL: https://github.com/apache/seatunnel/issues/13223
Related to #13221. This umbrella tracks the API safety contract, connector-by-connector migration, regression coverage, documentation and a CI gate for safe multi-replica routing. Use the claim-and-tracking format from #11007. All implementation work below is pending; an audit row is not a claim that a connector has already been fixed or tested against a live service. ## Problem and risk boundary Today, implementing `SupportMultiTableSinkWriter` does not establish that parallel replica writes are safe. Its default `primaryKey()` returns `Optional.empty()`, and `MultiTableSinkWriter` interprets that as permission to distribute rows randomly across independent writer queues. With `multi_table_sink_replica > 1`, operations for the same destination identity can reach different writer instances and flush or commit in a different order. An old update may overwrite a newer value, or an earlier insert/upsert may arrive after a delete and recreate a deleted record. Some destinations reject conflicting operations; others accept them and the job can succeed with an incorrect final state. #13221 reports an Iceberg reproduction of the latter. This issue's audit is source inspection, not a new reproduction of every connector. **The risk includes INSERT-only input when the sink performs keyed replacement or upsert.** Examples in the current source include DynamoDB item puts and Qdrant point upserts. Whether `TableSchema` has a primary key is not the deciding factor: the routing key must match the identity actually mutated by the sink. Do not classify every primary-key-capable sink as already corrupted. The result depends on the active writer mode and destination semantics. A destination sequence/version mechanism can establish safety only if its complete contract is demonstrated for all supported operations, including deletes. The mere presence of a sequence/precombine option, transaction support, internal sharding, bucket assignment or a broker message key is insufficient. Evidence: [SupportMultiTableSinkWriter](https://github.com/apache/seatunnel/blob/f5374addb396b3515fc2aff358b110ad35fe7874/seatunnel-api/src/main/java/org/apache/seatunnel/api/sink/SupportMultiTableSinkWriter.java#L21-L33); [MultiTableSinkWriter routing](https://github.com/apache/seatunnel/blob/f5374addb396b3515fc2aff358b110ad35fe7874/seatunnel-api/src/main/java/org/apache/seatunnel/api/sink/multitablesink/MultiTableSinkWriter.java#L602-L624); [MultiTableSink create/restore](https://github.com/apache/seatunnel/blob/f5374addb396b3515fc2aff358b110ad35fe7874/seatunnel-api/src/main/java/org/apache/seatunnel/api/sink/multitablesink/MultiTableSink.java#L138-L240); [BigQuery streaming changelog and sequence handling](https://github.com/apache/seatunnel/blob/f5374addb396b3515fc2aff358b110ad35fe7874/seatunnel-connectors-v2/connector-bigquery/src/main/java/org/apache/seatunnel/connectors/bigquery/convert/BigQuerySerializer.java#L83-L114). ## 1. API contract and initialization guard Introduce an explicit routing capability on `SupportMultiTableSinkWriter` while retaining the existing `primaryKey()` interface where possible: | Capability | Meaning | Behavior with replicas > 1 | | --- | --- | --- | | `KEYED` | The configured writer supplies a stable routing key matching its actual write semantics. | Route all operations for the same key to the same queue. | | `UNORDERED` | The configured writer explicitly guarantees safe unordered parallel writes. | Random distribution is allowed. | | `UNSUPPORTED` | Safe multi-replica routing has not been established for this writer/mode. | Fail before records are processed. | - Keep `multi_table_sink_replica = 1` and its default value unchanged. - An absent key must resolve conservatively to `UNSUPPORTED`, unless the writer explicitly declares and justifies `UNORDERED`. Preserve the existing JDBC keyed path when a valid key is provided. - Resolve capabilities from the configured writer, not by generically inferring a key from `TableSchema` inside `MultiTableSinkWriter`. A sink option or destination identity can differ from the upstream schema key. - Validate every table and all replica writers on both creation and restoration, including restore branches that create a fresh writer when state is absent. Reject inconsistent declarations or key positions across replicas of the same table. - `KEYED` must have a usable, stable key; declaring the enum alone is not sufficient. Where the current API cannot express a safe strategy for a mode or key type, reject multiple replicas until support exists. - Validate before worker submission and record processing, and release already-created writers/resources if initialization fails. - Use **fail-fast as the initial policy**, with an error naming the connector/writer, table, `multi_table_sink_replica`, configured replica count and remediation (`multi_table_sink_replica = 1` or a supported routing mode). A single-effective-queue fallback is acceptable only as a separately explicit policy with correct resource, state and restore mapping; never silently continue random routing. - Resolve the sole table before applying its routing strategy when a single-table row has no `tableId`. Today that branch randomly routes even if the writer declares a key. - Treat existing JDBC `BYTES` hashing, unique-only/no-key configurations and key-position changes after schema evolution as explicit audit gaps. Do not mark all JDBC modes safe merely because `JdbcSinkWriter` overrides `primaryKey()`. Composite routing APIs, content-based binary hashing and dynamic key updates may be implemented in focused follow-ups. Until their guarantees exist, affected multi-replica configurations must not be advertised as safely keyed. This umbrella addresses the extra replica queues within a subtask; it does not create ordering guarantees across unrelated upstream subtasks. ## 2. Source audit baseline and connector fix table Audited upstream `dev` at [`f5374addb396b3515fc2aff358b110ad35fe7874`](https://github.com/apache/seatunnel/commit/f5374addb396b3515fc2aff358b110ad35fe7874) on 2026-11-11. - 36 classes directly declare `SupportMultiTableSinkWriter`; following inheritance gives 42 writer classes, including 2 abstract bases and 40 concrete writer classes. - Only `JdbcSinkWriter` overrides `primaryKey()`. The other 39 concrete writer classes inherit the empty default. - 46 concrete sink classes declare/inherit `SupportMultiTableSink`. The table has 48 rows because JDBC normal/XA and BigQuery batch/streaming are separate runtime modes. - Shared implementations are included: eight multi-table file sinks use `BaseFileSinkWriter`; HTTP-derived sinks include Feishu, WeChat, GraphQL and Prometheus. Abstract bases (`AbstractJdbcSinkWriter`, `AbstractBigQuerySinkWriter`, `BaseMultipleTableFileSink`) must be covered when migrating their concrete paths. - `SensorsDataSDKWriter` is an additional marker-only case: its enclosing `SensorsDataSDKSink` does not declare `SupportMultiTableSink` at this baseline. It is listed separately below rather than counted as an active replica-routing failure. P0 = keyed mutation/replacement or existing keyed-path regression; P1 = endpoint, time-series, broker or table-mode semantics require an ordering decision; P2 = append/diagnostic/shared-writer candidates requiring an explicit audit. **P2 does not mean unordered-safe.** Every migration must choose `KEYED`, explicitly justified `UNORDERED`, or `UNSUPPORTED`; the suggestions below are audit directions, not completed capability declarations. | Priority | Connector / mode | Writer / source | Current primaryKey() | Required audit / fix | Contributor | Status | PR | | --- | --- | --- | --- | --- | --- | --- | --- | | P0 | [connector-jdbc / normal](https://github.com/apache/seatunnel/blob/f5374addb396b3515fc2aff358b110ad35fe7874/seatunnel-connectors-v2/connector-jdbc/src/main/java/org/apache/seatunnel/connectors/seatunnel/jdbc/sink/JdbcSink.java) | [JdbcSinkWriter](https://github.com/apache/seatunnel/blob/f5374addb396b3515fc2aff358b110ad35fe7874/seatunnel-connectors-v2/connector-jdbc/src/main/java/org/apache/seatunnel/connectors/seatunnel/jdbc/sink/JdbcSinkWriter.java) | Existing key index when available | Preserve the existing keyed path; audit missing/unique-only keys, BYTES hashing, schema changes and rows without tableId. | — | Todo | — | | P0 | [connector-jdbc / exactly-once (XA)](https://github.com/apache/seatunnel/blob/f5374addb396b3515fc2aff358b110ad35fe7874/seatunnel-connectors-v2/connector-jdbc/src/main/java/org/apache/seatunnel/connectors/seatunnel/jdbc/sink/JdbcSink.java) | [JdbcExactlyOnceSinkWriter](https://github.com/apache/seatunnel/blob/f5374addb396b3515fc2aff358b110ad35fe7874/seatunnel-connectors-v2/connector-jdbc/src/main/java/org/apache/seatunnel/connectors/seatunnel/jdbc/sink/JdbcExactlyOnceSinkWriter.java) | Empty (inherited) | Declare a routing key matching JDBC mutation semantics on create and restore, or reject replicas > 1; XA does not establish cross-writer order. | — | Todo | — | | P0 | [connector-bigquery / streaming](https://github.com/apache/seatunnel/blob/f5374addb396b3515fc2aff358b110ad35fe7874/seatunnel-connectors-v2/connector-bigquery/src/main/java/org/apache/seatunnel/connectors/bigquery/sink/BigQuerySink.java) | [BigQuerySinkStreamWriter](https://github.com/apache/seatunnel/blob/f5374addb396b3515fc2aff358b110ad35fe7874/seatunnel-connectors-v2/connector-bigquery/src/main/java/org/apache/seatunnel/connectors/bigquery/sink/BigQuerySinkStreamWriter.java) | Empty (inherited) | UPSERT/DELETE path: use the destination key or reject. Audit sequence_number_column separately; its existence alone is not a safety guarantee. | — | Todo | — | | P0 | [connector-doris](https://github.com/apache/seatunnel/blob/f5374addb396b3515fc2aff358b110ad35fe7874/seatunnel-connectors-v2/connector-doris/src/main/java/org/apache/seatunnel/connectors/doris/sink/DorisSink.java) | [DorisSinkWriter](https://github.com/apache/seatunnel/blob/f5374addb396b3515fc2aff358b110ad35fe7874/seatunnel-connectors-v2/connector-doris/src/main/java/org/apache/seatunnel/connectors/doris/sink/writer/DorisSinkWriter.java) | Empty | Audit keyed table models and stream-load/2PC ordering; provide a sink-semantic key or reject unsafe modes. | — | Todo | — | | P0 | [connector-elasticsearch](https://github.com/apache/seatunnel/blob/f5374addb396b3515fc2aff358b110ad35fe7874/seatunnel-connectors-v2/connector-elasticsearch/src/main/java/org/apache/seatunnel/connectors/seatunnel/elasticsearch/sink/ElasticsearchSink.java) | [ElasticsearchSinkWriter](https://github.com/apache/seatunnel/blob/f5374addb396b3515fc2aff358b110ad35fe7874/seatunnel-connectors-v2/connector-elasticsearch/src/main/java/org/apache/seatunnel/connectors/seatunnel/elasticsearch/sink/ElasticsearchSinkWriter.java) | Empty | Route by the actual configured document identity (primary_keys/index semantics); test updates and deletes. | — | Todo | — | | P0 | [connector-fluss](https://github.com/apache/seatunnel/blob/f5374addb396b3515fc2aff358b110ad35fe7874/seatunnel-connectors-v2/connector-fluss/src/main/java/org/apache/seatunnel/connectors/seatunnel/fluss/sink/FlussSink.java) | [FlussSinkWriter](https://github.com/apache/seatunnel/blob/f5374addb396b3515fc2aff358b110ad35fe7874/seatunnel-connectors-v2/connector-fluss/src/main/java/org/apache/seatunnel/connectors/seatunnel/fluss/sink/FlussSinkWriter.java) | Empty | Distinguish upsert and append writers; key the upsert mode; approve unordered append only with evidence. | — | Todo | — | | P0 | [connector-google-bigtable](https://github.com/apache/seatunnel/blob/f5374addb396b3515fc2aff358b110ad35fe7874/seatunnel-connectors-v2/connector-google-bigtable/src/main/java/org/apache/seatunnel/connectors/seatunnel/bigtable/sink/BigtableSink.java) | [BigtableSinkWriter](https://github.com/apache/seatunnel/blob/f5374addb396b3515fc2aff358b110ad35fe7874/seatunnel-connectors-v2/connector-google-bigtable/src/main/java/org/apache/seatunnel/connectors/seatunnel/bigtable/sink/BigtableSinkWriter.java) | Empty | Audit the actual row-key/cell-version mutation identity and asynchronous/batch ordering; key or reject. | — | Todo | — | | P0 | [connector-hbase](https://github.com/apache/seatunnel/blob/f5374addb396b3515fc2aff358b110ad35fe7874/seatunnel-connectors-v2/connector-hbase/src/main/java/org/apache/seatunnel/connectors/seatunnel/hbase/sink/HbaseSink.java) | [HbaseSinkWriter](https://github.com/apache/seatunnel/blob/f5374addb396b3515fc2aff358b110ad35fe7874/seatunnel-connectors-v2/connector-hbase/src/main/java/org/apache/seatunnel/connectors/seatunnel/hbase/sink/HbaseSinkWriter.java) | Empty | Puts can overwrite the same row/cell even for INSERT-only input; use row-key semantics or reject. | — | Todo | — | | P0 | [connector-hudi](https://github.com/apache/seatunnel/blob/f5374addb396b3515fc2aff358b110ad35fe7874/seatunnel-connectors-v2/connector-hudi/src/main/java/org/apache/seatunnel/connectors/seatunnel/hudi/sink/HudiSink.java) | [HudiSinkWriter](https://github.com/apache/seatunnel/blob/f5374addb396b3515fc2aff358b110ad35fe7874/seatunnel-connectors-v2/connector-hudi/src/main/java/org/apache/seatunnel/connectors/seatunnel/hudi/sink/writer/HudiSinkWriter.java) | Empty | Audit record-key/partition identity, upsert/delete, shared clients and precombine behavior; key or reject. | — | Todo | — | | P0 | [connector-hugegraph](https://github.com/apache/seatunnel/blob/f5374addb396b3515fc2aff358b110ad35fe7874/seatunnel-connectors-v2/connector-hugegraph/src/main/java/org/apache/seatunnel/connectors/seatunnel/hugegraph/sink/HugeGraphSink.java) | [HugeGraphSinkWriter](https://github.com/apache/seatunnel/blob/f5374addb396b3515fc2aff358b110ad35fe7874/seatunnel-connectors-v2/connector-hugegraph/src/main/java/org/apache/seatunnel/connectors/seatunnel/hugegraph/sink/HugeGraphSinkWriter.java) | Empty | Audit vertex/edge identity and UPDATE_BEFORE/UPDATE_AFTER correlation, including key-changing updates; reject until the full ordering contract is safe. | — | Todo | — | | P0 | [connector-iceberg](https://github.com/apache/seatunnel/blob/f5374addb396b3515fc2aff358b110ad35fe7874/seatunnel-connectors-v2/connector-iceberg/src/main/java/org/apache/seatunnel/connectors/seatunnel/iceberg/sink/IcebergSink.java) | [IcebergSinkWriter](https://github.com/apache/seatunnel/blob/f5374addb396b3515fc2aff358b110ad35fe7874/seatunnel-connectors-v2/connector-iceberg/src/main/java/org/apache/seatunnel/connectors/seatunnel/iceberg/sink/IcebergSinkWriter.java) | Empty | Use the writer's effective identifier/equality-delete key, including iceberg.table.primary-keys; test upsert/delete across replicas. | — | Todo | — | | P0 | [connector-kudu](https://github.com/apache/seatunnel/blob/f5374addb396b3515fc2aff358b110ad35fe7874/seatunnel-connectors-v2/connector-kudu/src/main/java/org/apache/seatunnel/connectors/seatunnel/kudu/sink/KuduSink.java) | [KuduSinkWriter](https://github.com/apache/seatunnel/blob/f5374addb396b3515fc2aff358b110ad35fe7874/seatunnel-connectors-v2/connector-kudu/src/main/java/org/apache/seatunnel/connectors/seatunnel/kudu/sink/KuduSinkWriter.java) | Empty | Match Kudu operation keys for insert/update/delete; prove same-key order or reject. | — | Todo | — | | P0 | [connector-mongodb](https://github.com/apache/seatunnel/blob/f5374addb396b3515fc2aff358b110ad35fe7874/seatunnel-connectors-v2/connector-mongodb/src/main/java/org/apache/seatunnel/connectors/seatunnel/mongodb/sink/MongodbSink.java) | [MongodbWriter](https://github.com/apache/seatunnel/blob/f5374addb396b3515fc2aff358b110ad35fe7874/seatunnel-connectors-v2/connector-mongodb/src/main/java/org/apache/seatunnel/connectors/seatunnel/mongodb/sink/MongodbWriter.java) | Empty | Match configured MongoDB mutation filters/document identity in transaction and non-transaction modes. | — | Todo | — | | P0 | [connector-paimon](https://github.com/apache/seatunnel/blob/f5374addb396b3515fc2aff358b110ad35fe7874/seatunnel-connectors-v2/connector-paimon/src/main/java/org/apache/seatunnel/connectors/seatunnel/paimon/sink/PaimonSink.java) | [PaimonSinkWriter](https://github.com/apache/seatunnel/blob/f5374addb396b3515fc2aff358b110ad35fe7874/seatunnel-connectors-v2/connector-paimon/src/main/java/org/apache/seatunnel/connectors/seatunnel/paimon/sink/PaimonSinkWriter.java) | Empty | Distinguish keyed/append and fixed/dynamic bucket modes. Bucket or engine routing is not a declaration for the inner replica queues; coordinate with #12366. | — | Todo | — | | P0 | [connector-redis](https://github.com/apache/seatunnel/blob/f5374addb396b3515fc2aff358b110ad35fe7874/seatunnel-connectors-v2/connector-redis/src/main/java/org/apache/seatunnel/connectors/seatunnel/redis/sink/RedisSink.java) | [RedisSinkWriter](https://github.com/apache/seatunnel/blob/f5374addb396b3515fc2aff358b110ad35fe7874/seatunnel-connectors-v2/connector-redis/src/main/java/org/apache/seatunnel/connectors/seatunnel/redis/sink/RedisSinkWriter.java) | Empty | Use the effective Redis key expression and command semantics; a schema key alone may not match the destination key. | — | Todo | — | | P0 | [connector-starrocks](https://github.com/apache/seatunnel/blob/f5374addb396b3515fc2aff358b110ad35fe7874/seatunnel-connectors-v2/connector-starrocks/src/main/java/org/apache/seatunnel/connectors/seatunnel/starrocks/sink/StarRocksSink.java) | [StarRocksSinkWriter](https://github.com/apache/seatunnel/blob/f5374addb396b3515fc2aff358b110ad35fe7874/seatunnel-connectors-v2/connector-starrocks/src/main/java/org/apache/seatunnel/connectors/seatunnel/starrocks/sink/StarRocksSinkWriter.java) | Empty | Audit destination key/table model, stream-load batching and delete/update behavior; key or reject. | — | Todo | — | | P0 | [connector-typesense](https://github.com/apache/seatunnel/blob/f5374addb396b3515fc2aff358b110ad35fe7874/seatunnel-connectors-v2/connector-typesense/src/main/java/org/apache/seatunnel/connectors/seatunnel/typesense/sink/TypesenseSink.java) | [TypesenseSinkWriter](https://github.com/apache/seatunnel/blob/f5374addb396b3515fc2aff358b110ad35fe7874/seatunnel-connectors-v2/connector-typesense/src/main/java/org/apache/seatunnel/connectors/seatunnel/typesense/sink/TypesenseSinkWriter.java) | Empty | Use the actual document ID for insert/update/delete; also verify local buffered-write versus immediate-delete ordering. | — | Todo | — | | P0 | [connector-amazondynamodb](https://github.com/apache/seatunnel/blob/f5374addb396b3515fc2aff358b110ad35fe7874/seatunnel-connectors-v2/connector-amazondynamodb/src/main/java/org/apache/seatunnel/connectors/seatunnel/amazondynamodb/sink/AmazonDynamoDBSink.java) | [AmazonDynamoDBWriter](https://github.com/apache/seatunnel/blob/f5374addb396b3515fc2aff358b110ad35fe7874/seatunnel-connectors-v2/connector-amazondynamodb/src/main/java/org/apache/seatunnel/connectors/seatunnel/amazondynamodb/sink/AmazonDynamoDBWriter.java) | Empty | PutRequest can replace an existing item; use destination partition/sort-key semantics or reject, even for INSERT-only input. | — | Todo | — | | P0 | [connector-qdrant](https://github.com/apache/seatunnel/blob/f5374addb396b3515fc2aff358b110ad35fe7874/seatunnel-connectors-v2/connector-qdrant/src/main/java/org/apache/seatunnel/connectors/seatunnel/qdrant/sink/QdrantSink.java) | [QdrantSinkWriter](https://github.com/apache/seatunnel/blob/f5374addb396b3515fc2aff358b110ad35fe7874/seatunnel-connectors-v2/connector-qdrant/src/main/java/org/apache/seatunnel/connectors/seatunnel/qdrant/sink/QdrantSinkWriter.java) | Empty | Point upserts with the same explicit ID need ordering; distinguish generated-ID writes and explicit-ID writes before declaring a capability. | — | Todo | — | | P1 | [connector-clickhouse](https://github.com/apache/seatunnel/blob/f5374addb396b3515fc2aff358b110ad35fe7874/seatunnel-connectors-v2/connector-clickhouse/src/main/java/org/apache/seatunnel/connectors/seatunnel/clickhouse/sink/client/ClickhouseSink.java) | [ClickhouseSinkWriter](https://github.com/apache/seatunnel/blob/f5374addb396b3515fc2aff358b110ad35fe7874/seatunnel-connectors-v2/connector-clickhouse/src/main/java/org/apache/seatunnel/connectors/seatunnel/clickhouse/sink/client/ClickhouseSinkWriter.java) | Empty | Audit SQL/write semantics and destination table engine; shard selection does not route the MultiTableSink replica queues. | — | Todo | — | | P1 | [connector-influxdb](https://github.com/apache/seatunnel/blob/f5374addb396b3515fc2aff358b110ad35fe7874/seatunnel-connectors-v2/connector-influxdb/src/main/java/org/apache/seatunnel/connectors/seatunnel/influxdb/sink/InfluxDBSink.java) | [InfluxDBSinkWriter](https://github.com/apache/seatunnel/blob/f5374addb396b3515fc2aff358b110ad35fe7874/seatunnel-connectors-v2/connector-influxdb/src/main/java/org/apache/seatunnel/connectors/seatunnel/influxdb/sink/InfluxDBSinkWriter.java) | Empty | Audit measurement/tags/timestamp identity and repeated-point overwrite semantics; key or reject unless unordered safety is proven. | — | Todo | — | | P1 | [connector-tdengine](https://github.com/apache/seatunnel/blob/f5374addb396b3515fc2aff358b110ad35fe7874/seatunnel-connectors-v2/connector-tdengine/src/main/java/org/apache/seatunnel/connectors/seatunnel/tdengine/sink/TDengineSink.java) | [TDengineSinkWriter](https://github.com/apache/seatunnel/blob/f5374addb396b3515fc2aff358b110ad35fe7874/seatunnel-connectors-v2/connector-tdengine/src/main/java/org/apache/seatunnel/connectors/seatunnel/tdengine/sink/TDengineSinkWriter.java) | Empty | Audit subtable/timestamp identity and update policy; do not assume INSERT SQL means order independence. | — | Todo | — | | P1 | [connector-prometheus](https://github.com/apache/seatunnel/blob/f5374addb396b3515fc2aff358b110ad35fe7874/seatunnel-connectors-v2/connector-prometheus/src/main/java/org/apache/seatunnel/connectors/seatunnel/prometheus/sink/PrometheusSink.java) | [PrometheusWriter](https://github.com/apache/seatunnel/blob/f5374addb396b3515fc2aff358b110ad35fe7874/seatunnel-connectors-v2/connector-prometheus/src/main/java/org/apache/seatunnel/connectors/seatunnel/prometheus/sink/PrometheusWriter.java) | Empty (inherited) | Audit series identity and timestamp ordering accepted by the receiver; do not inherit a blanket UNORDERED declaration from HttpSinkWriter. | — | Todo | — | | P1 | [connector-pulsar](https://github.com/apache/seatunnel/blob/f5374addb396b3515fc2aff358b110ad35fe7874/seatunnel-connectors-v2/connector-pulsar/src/main/java/org/apache/seatunnel/connectors/seatunnel/pulsar/sink/PulsarSink.java) | [PulsarSinkWriter](https://github.com/apache/seatunnel/blob/f5374addb396b3515fc2aff358b110ad35fe7874/seatunnel-connectors-v2/connector-pulsar/src/main/java/org/apache/seatunnel/connectors/seatunnel/pulsar/sink/PulsarSinkWriter.java) | Empty | Audit keyed messages and ordering across independent producers/transactions. A broker message key alone does not co-locate SeaTunnel writer instances. | — | Todo | — | | P1 | [connector-http / Http](https://github.com/apache/seatunnel/blob/f5374addb396b3515fc2aff358b110ad35fe7874/seatunnel-connectors-v2/connector-http/connector-http-base/src/main/java/org/apache/seatunnel/connectors/seatunnel/http/sink/HttpSink.java) | [HttpSinkWriter](https://github.com/apache/seatunnel/blob/f5374addb396b3515fc2aff358b110ad35fe7874/seatunnel-connectors-v2/connector-http/connector-http-base/src/main/java/org/apache/seatunnel/connectors/seatunnel/http/sink/HttpSinkWriter.java) | Empty | Arbitrary HTTP side effects are not generically unordered-safe; default to UNSUPPORTED unless a specific contract is established. | — | Todo | — | | P1 | [connector-graphql](https://github.com/apache/seatunnel/blob/f5374addb396b3515fc2aff358b110ad35fe7874/seatunnel-connectors-v2/connector-graphql/src/main/java/org/apache/seatunnel/connectors/seatunnel/graphql/sink/GraphQLSink.java) | [GraphQLSinkWriter](https://github.com/apache/seatunnel/blob/f5374addb396b3515fc2aff358b110ad35fe7874/seatunnel-connectors-v2/connector-graphql/src/main/java/org/apache/seatunnel/connectors/seatunnel/graphql/sink/GraphQLSinkWriter.java) | Empty (inherited) | Arbitrary GraphQL mutations require their own ordering policy; avoid inheriting an append-only assumption from HTTP. | — | Todo | — | | P1 | [connector-http-airtable](https://github.com/apache/seatunnel/blob/f5374addb396b3515fc2aff358b110ad35fe7874/seatunnel-connectors-v2/connector-http/connector-http-airtable/src/main/java/org/apache/seatunnel/connectors/seatunnel/airtable/sink/AirtableSink.java) | [AirtableSinkWriter](https://github.com/apache/seatunnel/blob/f5374addb396b3515fc2aff358b110ad35fe7874/seatunnel-connectors-v2/connector-http/connector-http-airtable/src/main/java/org/apache/seatunnel/connectors/seatunnel/airtable/sink/AirtableSinkWriter.java) | Empty | Audit endpoint operation, identity, batching and retry semantics before selecting KEYED, UNORDERED or UNSUPPORTED. | — | Todo | — | | P1 | [connector-http-zendesk](https://github.com/apache/seatunnel/blob/f5374addb396b3515fc2aff358b110ad35fe7874/seatunnel-connectors-v2/connector-http/connector-http-zendesk/src/main/java/org/apache/seatunnel/connectors/seatunnel/zendesk/sink/ZendeskSink.java) | [ZendeskSinkWriter](https://github.com/apache/seatunnel/blob/f5374addb396b3515fc2aff358b110ad35fe7874/seatunnel-connectors-v2/connector-http/connector-http-zendesk/src/main/java/org/apache/seatunnel/connectors/seatunnel/zendesk/sink/ZendeskSinkWriter.java) | Empty | Audit configured endpoint/method and resource identity; generic request support is not evidence for unordered safety. | — | Todo | — | | P2 | [connector-bigquery / batch](https://github.com/apache/seatunnel/blob/f5374addb396b3515fc2aff358b110ad35fe7874/seatunnel-connectors-v2/connector-bigquery/src/main/java/org/apache/seatunnel/connectors/bigquery/sink/BigQuerySink.java) | [BigQuerySinkBatchWriter](https://github.com/apache/seatunnel/blob/f5374addb396b3515fc2aff358b110ad35fe7874/seatunnel-connectors-v2/connector-bigquery/src/main/java/org/apache/seatunnel/connectors/bigquery/sink/BigQuerySinkBatchWriter.java) | Empty (inherited) | Audit append-only semantics, buffered stream offsets, checkpoint state and restore before explicitly declaring UNORDERED. | — | Todo | — | | P2 | [connector-deeplake](https://github.com/apache/seatunnel/blob/f5374addb396b3515fc2aff358b110ad35fe7874/seatunnel-connectors-v2/connector-deeplake/src/main/java/org/apache/seatunnel/connectors/seatunnel/deeplake/sink/DeepLakeSink.java) | [DeepLakeSinkWriter](https://github.com/apache/seatunnel/blob/f5374addb396b3515fc2aff358b110ad35fe7874/seatunnel-connectors-v2/connector-deeplake/src/main/java/org/apache/seatunnel/connectors/seatunnel/deeplake/sink/DeepLakeSinkWriter.java) | Empty | The current writer rejects non-INSERT rows; verify independent append batches/concurrent writes before declaring UNORDERED. | — | Todo | — | | P2 | [connector-druid](https://github.com/apache/seatunnel/blob/f5374addb396b3515fc2aff358b110ad35fe7874/seatunnel-connectors-v2/connector-druid/src/main/java/org/apache/seatunnel/connectors/druid/sink/DruidSink.java) | [DruidWriter](https://github.com/apache/seatunnel/blob/f5374addb396b3515fc2aff358b110ad35fe7874/seatunnel-connectors-v2/connector-druid/src/main/java/org/apache/seatunnel/connectors/druid/sink/DruidWriter.java) | Empty | Audit ingestion/append versus replacement behavior and concurrent indexing tasks before declaring UNORDERED. | — | Todo | — | | P2 | [connector-lance](https://github.com/apache/seatunnel/blob/f5374addb396b3515fc2aff358b110ad35fe7874/seatunnel-connectors-v2/connector-lance/src/main/java/org/apache/seatunnel/connectors/seatunnel/lance/sink/LanceSink.java) | [LanceSinkWriter](https://github.com/apache/seatunnel/blob/f5374addb396b3515fc2aff358b110ad35fe7874/seatunnel-connectors-v2/connector-lance/src/main/java/org/apache/seatunnel/connectors/seatunnel/lance/sink/LanceSinkWriter.java) | Empty | Audit append transactions and concurrent dataset commit/conflict handling before declaring UNORDERED. | — | Todo | — | | P2 | [connector-maxcompute](https://github.com/apache/seatunnel/blob/f5374addb396b3515fc2aff358b110ad35fe7874/seatunnel-connectors-v2/connector-maxcompute/src/main/java/org/apache/seatunnel/connectors/seatunnel/maxcompute/sink/MaxcomputeSink.java) | [MaxcomputeWriter](https://github.com/apache/seatunnel/blob/f5374addb396b3515fc2aff358b110ad35fe7874/seatunnel-connectors-v2/connector-maxcompute/src/main/java/org/apache/seatunnel/connectors/seatunnel/maxcompute/sink/MaxcomputeWriter.java) | Empty | Audit the selected writer/session and destination mode; explicitly declare UNORDERED only for demonstrated safe modes. | — | Todo | — | | P2 | [connector-datahub](https://github.com/apache/seatunnel/blob/f5374addb396b3515fc2aff358b110ad35fe7874/seatunnel-connectors-v2/connector-datahub/src/main/java/org/apache/seatunnel/connectors/seatunnel/datahub/sink/DataHubSink.java) | [DataHubWriter](https://github.com/apache/seatunnel/blob/f5374addb396b3515fc2aff358b110ad35fe7874/seatunnel-connectors-v2/connector-datahub/src/main/java/org/apache/seatunnel/connectors/seatunnel/datahub/sink/DataHubWriter.java) | Empty | Audit topic/shard ordering and delivery guarantees; explicitly document whether unordered records are supported. | — | Todo | — | | P2 | [connector-console](https://github.com/apache/seatunnel/blob/f5374addb396b3515fc2aff358b110ad35fe7874/seatunnel-connectors-v2/connector-console/src/main/java/org/apache/seatunnel/connectors/seatunnel/console/sink/ConsoleSink.java) | [ConsoleSinkWriter](https://github.com/apache/seatunnel/blob/f5374addb396b3515fc2aff358b110ad35fe7874/seatunnel-connectors-v2/connector-console/src/main/java/org/apache/seatunnel/connectors/seatunnel/console/sink/ConsoleSinkWriter.java) | Empty | Candidate for explicit UNORDERED after documenting output-order semantics and verifying all records are retained. | — | Todo | — | | P2 | [connector-assert](https://github.com/apache/seatunnel/blob/f5374addb396b3515fc2aff358b110ad35fe7874/seatunnel-connectors-v2/connector-assert/src/main/java/org/apache/seatunnel/connectors/seatunnel/assertion/sink/AssertSink.java) | [AssertSinkWriter](https://github.com/apache/seatunnel/blob/f5374addb396b3515fc2aff358b110ad35fe7874/seatunnel-connectors-v2/connector-assert/src/main/java/org/apache/seatunnel/connectors/seatunnel/assertion/sink/AssertSinkWriter.java) | Empty | Audit all assertion modes and shared counters; declare UNORDERED only where assertions do not depend on record order. | — | Todo | — | | P2 | [connector-email](https://github.com/apache/seatunnel/blob/f5374addb396b3515fc2aff358b110ad35fe7874/seatunnel-connectors-v2/connector-email/src/main/java/org/apache/seatunnel/connectors/seatunnel/email/sink/EmailSink.java) | [EmailSinkWriter](https://github.com/apache/seatunnel/blob/f5374addb396b3515fc2aff358b110ad35fe7874/seatunnel-connectors-v2/connector-email/src/main/java/org/apache/seatunnel/connectors/seatunnel/email/sink/EmailSinkWriter.java) | Empty | Audit per-writer message grouping and delivery order; replicas change both email grouping and ordering. | — | Todo | — | | P2 | [connector-http-feishu](https://github.com/apache/seatunnel/blob/f5374addb396b3515fc2aff358b110ad35fe7874/seatunnel-connectors-v2/connector-http/connector-http-feishu/src/main/java/org/apache/seatunnel/connectors/seatunnel/feishu/sink/FeishuSink.java) | [HttpSinkWriter](https://github.com/apache/seatunnel/blob/f5374addb396b3515fc2aff358b110ad35fe7874/seatunnel-connectors-v2/connector-http/connector-http-base/src/main/java/org/apache/seatunnel/connectors/seatunnel/http/sink/HttpSinkWriter.java) | Empty (shared writer) | Audit notification delivery order; keep generic HTTP and mutation-based descendants protected when adding any specialized declaration. | — | Todo | — | | P2 | [connector-http-wechat](https://github.com/apache/seatunnel/blob/f5374addb396b3515fc2aff358b110ad35fe7874/seatunnel-connectors-v2/connector-http/connector-http-wechat/src/main/java/org/apache/seatunnel/connectors/seatunnel/wechat/sink/WeChatSink.java) | [HttpSinkWriter](https://github.com/apache/seatunnel/blob/f5374addb396b3515fc2aff358b110ad35fe7874/seatunnel-connectors-v2/connector-http/connector-http-base/src/main/java/org/apache/seatunnel/connectors/seatunnel/http/sink/HttpSinkWriter.java) | Empty (shared writer) | Audit notification delivery order; keep generic HTTP and mutation-based descendants protected when adding any specialized declaration. | — | Todo | — | | P2 | [connector-file-ftp](https://github.com/apache/seatunnel/blob/f5374addb396b3515fc2aff358b110ad35fe7874/seatunnel-connectors-v2/connector-file/connector-file-ftp/src/main/java/org/apache/seatunnel/connectors/seatunnel/file/ftp/sink/FtpFileSink.java) | [BaseFileSinkWriter](https://github.com/apache/seatunnel/blob/f5374addb396b3515fc2aff358b110ad35fe7874/seatunnel-connectors-v2/connector-file/connector-file-base/src/main/java/org/apache/seatunnel/connectors/seatunnel/file/sink/BaseFileSinkWriter.java) | Empty (shared writer) | Audit append/CDC output ordering, distinct file names and commit/restore semantics; then explicitly declare safe modes through the shared file writer. | — | Todo | — | | P2 | [connector-file-gcs](https://github.com/apache/seatunnel/blob/f5374addb396b3515fc2aff358b110ad35fe7874/seatunnel-connectors-v2/connector-file/connector-file-gcs/src/main/java/org/apache/seatunnel/connectors/seatunnel/file/gcs/sink/GcsFileSink.java) | [BaseFileSinkWriter](https://github.com/apache/seatunnel/blob/f5374addb396b3515fc2aff358b110ad35fe7874/seatunnel-connectors-v2/connector-file/connector-file-base/src/main/java/org/apache/seatunnel/connectors/seatunnel/file/sink/BaseFileSinkWriter.java) | Empty (shared writer) | Audit append/CDC output ordering, distinct file names and commit/restore semantics; then explicitly declare safe modes through the shared file writer. | — | Todo | — | | P2 | [connector-file-hadoop](https://github.com/apache/seatunnel/blob/f5374addb396b3515fc2aff358b110ad35fe7874/seatunnel-connectors-v2/connector-file/connector-file-hadoop/src/main/java/org/apache/seatunnel/connectors/seatunnel/file/hdfs/sink/HdfsFileSink.java) | [BaseFileSinkWriter](https://github.com/apache/seatunnel/blob/f5374addb396b3515fc2aff358b110ad35fe7874/seatunnel-connectors-v2/connector-file/connector-file-base/src/main/java/org/apache/seatunnel/connectors/seatunnel/file/sink/BaseFileSinkWriter.java) | Empty (shared writer) | Audit append/CDC output ordering, distinct file names and commit/restore semantics; then explicitly declare safe modes through the shared file writer. | — | Todo | — | | P2 | [connector-file-local](https://github.com/apache/seatunnel/blob/f5374addb396b3515fc2aff358b110ad35fe7874/seatunnel-connectors-v2/connector-file/connector-file-local/src/main/java/org/apache/seatunnel/connectors/seatunnel/file/local/sink/LocalFileSink.java) | [BaseFileSinkWriter](https://github.com/apache/seatunnel/blob/f5374addb396b3515fc2aff358b110ad35fe7874/seatunnel-connectors-v2/connector-file/connector-file-base/src/main/java/org/apache/seatunnel/connectors/seatunnel/file/sink/BaseFileSinkWriter.java) | Empty (shared writer) | Audit append/CDC output ordering, distinct file names and commit/restore semantics; then explicitly declare safe modes through the shared file writer. | — | Todo | — | | P2 | [connector-file-oss](https://github.com/apache/seatunnel/blob/f5374addb396b3515fc2aff358b110ad35fe7874/seatunnel-connectors-v2/connector-file/connector-file-oss/src/main/java/org/apache/seatunnel/connectors/seatunnel/file/oss/sink/OssFileSink.java) | [BaseFileSinkWriter](https://github.com/apache/seatunnel/blob/f5374addb396b3515fc2aff358b110ad35fe7874/seatunnel-connectors-v2/connector-file/connector-file-base/src/main/java/org/apache/seatunnel/connectors/seatunnel/file/sink/BaseFileSinkWriter.java) | Empty (shared writer) | Audit append/CDC output ordering, distinct file names and commit/restore semantics; then explicitly declare safe modes through the shared file writer. | — | Todo | — | | P2 | [connector-file-s3](https://github.com/apache/seatunnel/blob/f5374addb396b3515fc2aff358b110ad35fe7874/seatunnel-connectors-v2/connector-file/connector-file-s3/src/main/java/org/apache/seatunnel/connectors/seatunnel/file/s3/sink/S3FileSink.java) | [BaseFileSinkWriter](https://github.com/apache/seatunnel/blob/f5374addb396b3515fc2aff358b110ad35fe7874/seatunnel-connectors-v2/connector-file/connector-file-base/src/main/java/org/apache/seatunnel/connectors/seatunnel/file/sink/BaseFileSinkWriter.java) | Empty (shared writer) | Audit append/CDC output ordering, distinct file names and commit/restore semantics; then explicitly declare safe modes through the shared file writer. | — | Todo | — | | P2 | [connector-file-sftp](https://github.com/apache/seatunnel/blob/f5374addb396b3515fc2aff358b110ad35fe7874/seatunnel-connectors-v2/connector-file/connector-file-sftp/src/main/java/org/apache/seatunnel/connectors/seatunnel/file/sftp/sink/SftpFileSink.java) | [BaseFileSinkWriter](https://github.com/apache/seatunnel/blob/f5374addb396b3515fc2aff358b110ad35fe7874/seatunnel-connectors-v2/connector-file/connector-file-base/src/main/java/org/apache/seatunnel/connectors/seatunnel/file/sink/BaseFileSinkWriter.java) | Empty (shared writer) | Audit append/CDC output ordering, distinct file names and commit/restore semantics; then explicitly declare safe modes through the shared file writer. | — | Todo | — | | P2 | [connector-file-smb](https://github.com/apache/seatunnel/blob/f5374addb396b3515fc2aff358b110ad35fe7874/seatunnel-connectors-v2/connector-file/connector-file-smb/src/main/java/org/apache/seatunnel/connectors/seatunnel/file/smb/sink/SmbFileSink.java) | [BaseFileSinkWriter](https://github.com/apache/seatunnel/blob/f5374addb396b3515fc2aff358b110ad35fe7874/seatunnel-connectors-v2/connector-file/connector-file-base/src/main/java/org/apache/seatunnel/connectors/seatunnel/file/sink/BaseFileSinkWriter.java) | Empty (shared writer) | Audit append/CDC output ordering, distinct file names and commit/restore semantics; then explicitly declare safe modes through the shared file writer. | — | Todo | — | | P2 | [connector-hive](https://github.com/apache/seatunnel/blob/f5374addb396b3515fc2aff358b110ad35fe7874/seatunnel-connectors-v2/connector-hive/src/main/java/org/apache/seatunnel/connectors/seatunnel/hive/sink/HiveSink.java) | [HiveSinkWriter](https://github.com/apache/seatunnel/blob/f5374addb396b3515fc2aff358b110ad35fe7874/seatunnel-connectors-v2/connector-hive/src/main/java/org/apache/seatunnel/connectors/seatunnel/hive/sink/writter/HiveSinkWriter.java) | Empty (inherited) | Audit inherited file writing, Hive commit/partition behavior and append/CDC semantics before declaring UNORDERED. | — | Todo | — | ### Additional interface consistency audit | Connector | Writer / source | Finding | Required action | Contributor | Status | PR | | --- | --- | --- | --- | --- | --- | --- | | connector-sensorsdata | [SensorsDataSDKWriter](https://github.com/apache/seatunnel/blob/f5374addb396b3515fc2aff358b110ad35fe7874/seatunnel-connectors-v2/connector-sensorsdata/src/main/java/org/apache/seatunnel/connectors/sensorsdata/sdk/sink/SensorsDataSDKWriter.java) | Writer implements the interface, but SensorsDataSDKSink does not declare multi-table support. | Reconcile the declaration and audit profile/item updates versus events; do not enable unordered replicas as a side effect. | — | Todo | — | The source count is about implementation classes, not a claim that 39 distinct connector products are broken. Several plugins share one writer and some modes have different semantics. File implementations without a multi-table sink declaration are not newly enabled by this task. ## 3. Add a CI node for the routing contract Reuse the connector specification-check approach: [ConnectorSpecificationCheckTest](https://github.com/apache/seatunnel/blob/f5374addb396b3515fc2aff358b110ad35fe7874/seatunnel-dist/src/test/java/org/apache/seatunnel/api/connector/ConnectorSpecificationCheckTest.java#L196-L234) already checks that a multi-table sink declares `MULTI_TABLE_SINK_REPLICA` in its `optionRule()` and returns a compatible writer type. Extend that coverage and wire a visible **Multi-table sink routing** check into [Backend workflow](https://github.com/apache/seatunnel/blob/f5374addb396b3515fc2aff358b110ad35fe7874/.github/workflows/backend.yml). The CI work is a separate claimable slice and must include: - Discover concrete writer implementations through inheritance and shared bases, not just classes containing the interface name or the declared return type of `createWriter()`. In particular, `AbstractJdbcSinkWriter` must not hide the normal/XA distinction, and `AbstractBigQuerySinkWriter` must not hide batch/streaming behavior. - Require an explicit audited capability implementation, or a reviewed inherited declaration that is valid for every affected mode. Do not require `primaryKey()` for `UNORDERED`/`UNSUPPORTED`, and do not treat any override returning `Optional.empty()` as a valid keyed strategy. - Ensure a generic HTTP declaration cannot accidentally certify GraphQL mutations, Prometheus or other descendants as unordered-safe. - Separate structural CI checks from behavior: reflection can establish that a method is declared, but cannot prove the runtime key or destination ordering. Connector tests must validate mode/config-dependent declarations; API tests must enforce the resolved capability. - Run the contract check for changes to the API, connectors, shared writer bases, specification tests and CI/workflow selection rules. A new connector or an inherited implementation change must not bypass it because `seatunnel-dist` was omitted from the selected modules. - Keep contract discovery free of real network/client initialization. Put live destination checks in the corresponding existing connector E2E suites. - If phased migration needs a temporary baseline, pin it to the existing inventory with a tracking row and reason. Reject new unclassified implementations and expanding exemptions; remove entries as migrations land. A CI migration baseline must **never** bypass the runtime `UNSUPPORTED` guard. - Add regression fixtures for unclassified writers, valid inherited declarations, invalid `KEYED` without a runtime key, unordered/unsupported modes, abstract/generic return types, shared bases and newly added writers. ## Work packages / claim tracking | Area | Scope | Contributor | Status | Issue / PR | | --- | --- | --- | --- | --- | | API | Capability contract and backward-compatible `primaryKey()` integration | — | Todo | Coordinate with #13221 | | API | Fail-fast validation on creation/restoration, null-tableId routing and cleanup | — | Todo | This issue | | Connector-V2 | Migrate and test each connector/mode in the table above | — | Todo | One focused connector slice per PR | | CI | Dedicated routing contract check, inventory coverage and workflow selection | — | Todo | This issue | | Tests | API regressions and affected existing connector E2E scenarios | — | Todo | Include with the corresponding implementation | | Docs | EN/ZH routing contract, connector capability matrix and migration guidance | — | Todo | This issue | ## Regression coverage and acceptance criteria - [ ] Add the explicit `KEYED` / `UNORDERED` / `UNSUPPORTED` contract; an empty key never implicitly authorizes unordered writes. - [ ] Validate capabilities before processing records on both create and restore, including mixed-capability tables and inconsistent replica declarations. - [ ] Preserve single-replica behavior and the existing valid JDBC keyed route. - [ ] Reject unsupported multi-replica modes clearly; if an explicit fallback is implemented, prove its state/resource/restore semantics. - [ ] Cover deterministic same-key sequences with replicas 1, 2 and 4: successive updates, update then delete, delete then reinsert, and repeated INSERTs to the same upsert identity. Assert both queue co-location and the expected final logical state. - [ ] Cover single-table rows without tableId, multi-table routing, absent keys, null/invalid key configurations and restoration. Use controlled writer delays rather than probabilistic random-routing assertions. - [ ] Cover JDBC normal/XA, BigQuery batch/streaming and inherited/shared writer declarations. - [ ] Explicitly accept unordered test writers while rejecting unsupported ones; verify initialization failure closes resources and starts no consumers. - [ ] Update the existing connector unit/factory tests and existing E2E suite whenever its connector is migrated. Include repeated-key final-state checks, not only successful job completion or row counts. - [ ] Add the visible CI node and verify it blocks a newly introduced writer without an audited routing declaration. - [ ] Complete every audit row with the chosen capability, supporting tests, contributor and PR; keep unresolved modes `UNSUPPORTED`. - [ ] Update `docs/en` and `docs/zh`, common replica-option/multi-table documentation, and both `introduction/concepts/incompatible-changes.md` files. Document that previously accepted unsafe replicas > 1 now fail, with `multi_table_sink_replica = 1` as the migration path. ## How to claim a slice 1. Comment with the connector and concrete writer mode, audited `dev` SHA, proposed capability/key semantics and test plan. 2. Search open and closed PRs before implementing and again before submission. Coordinate API work with #13221 and affected Paimon routing work with #12366. 3. Keep changes focused, preserve config names/defaults and public SPI compatibility where possible, and include matching EN/ZH documentation for behavior changes. 4. Link the implementation PR here so the contributor/status/PR columns can be updated. Do not mark a row complete from a method override alone. Reference tracking style: #11007. No runtime/CI implementation or live connector validation is claimed by this issue creation. -- 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]
