Skip to content

[Docs] Fix connector and engine doc inaccuracies verified against source code - #12730

Merged
nzw921rx merged 17 commits into
apache:devfrom
zhangshenghang:docs-fix-batch-20261011
Nov 25, 2026
Merged

nzw921rx merged 17 commits into
apache:devfrom
zhangshenghang:docs-fix-batch-20261011

Conversation

@zhangshenghang

Copy link
Copy Markdown
Member

Purpose of this PR

This PR fixes a batch of real documentation bugs found by auditing the docs against the Java source code on the current dev branch. All fixes are backed by code evidence; no formatting-only or cosmetic churn is included.

Documentation issues found and what was changed

Clickhouse connector (wrong type mappings)

  • docs/{en,zh}/connectors/source/Clickhouse.md: the doc claimed DateTime -> TIME. The source converter (TypeConvertUtil) maps ClickHouse DateTime (object class LocalDateTime) to LOCAL_DATE_TIME_TYPE, i.e. TIMESTAMP; LOCAL_TIME_TYPE is never produced. Also split the over-lumped integer row to match the actual object-class mapping (Int8 -> TINYINT, Int16/UInt8 -> SMALLINT, Int32/UInt16 -> INT, Int64/UInt32/UInt64 -> BIGINT), verified against the clickhouse-client 0.3.2-patch11 ClickHouseDataType object classes.
  • docs/{en,zh}/connectors/sink/Clickhouse.md: the doc claimed TIME -> DateTime. ClickhouseTypeConverter.reconvert maps TIME to STRING (this converter generates the ${rowtype_fields} DDL used by save_mode_create_template). Added the missing TIMESTAMP -> DateTime64 and BOOLEAN -> Bool rows, split TINYINT -> Int8, SMALLINT -> Int16, INT -> Int32 per the converter, and fixed the example that used Kafka's port 9092 for a ClickHouse HTTP host (everything else in the doc uses 8123).

File connectors

  • docs/{en,zh}/connectors/source/ObsFile.md: the STS example used hadoop_obs_properties, an option that does not exist anywhere in the codebase (ObsFileBaseOptions defines only access_key/access_secret/endpoint/bucket, and ObsConf maps exactly those three into the Hadoop config). Rewrote the example to use the real options and documented that no extra Hadoop OBS property pass-through (e.g. session token) exists. Also removed a duplicated sheet_name row in the zh table.
  • docs/{en,zh}/connectors/sink/OssFile.md and docs/zh/connectors/sink/CosFile.md: the CDC schema-evolution example block used the wrong plugin name LocalFile for an OSS/COS sink (silently misleading for copy-paste users). Changed to OssFile / CosFile with the connector's required credential options, aligned with the correct en CosFile example.
  • docs/{en,zh}/connectors/source/LocalFile.md: file_format_type was marked required, but LocalFileSourceFactory registers it as .optional(...) (only tables_configs/path are exclusive-required). Marked it optional.
  • docs/{en,zh}/connectors/sink/{CosFile,OssJindoFile}.md: added the enable_header_write, schema_save_mode, data_save_mode option rows that every sibling file-sink doc documents and that the shared base sink (FileBaseSinkOptions, read unconditionally by BaseMultipleTableFileSink) supports.
  • docs/{en,zh}/connectors/sink/ObsFile.md: added missing shared sink option rows (tmp_path, filename_extension, encoding, csv_string_quote_mode, enable_header_write, schema_save_mode, data_save_mode), limited to the formats the doc claims for this connector.
  • docs/{en,zh}/connectors/sink/BosFile.md: added 10 missing shared sink option rows (excel/csv/cdc/save-mode options), matching FileBaseSinkOptions defaults.
  • docs/{en,zh}/connectors/source/OssFile.md: added archive_compress_codec (enum zip/tar/tar.gz/gz/none, default none), enable_file_split (default false, text/json/csv/parquet per FileFormat.supportFileSplit()) and file_split_size (default 134217728) rows that other file-source docs already document.

CDC production cookbook

  • docs/{en,zh}/connectors/cdc-production-cookbook.md: the MySQL-CDC examples used exactly-once = true, but the option key is exactly_once (underscore, no fallback keys in SourceOptions), so the documented config silently runs at-least-once. The Postgres-CDC example used schema-names, but the Postgres connector option is schema-name (PostgresIncrementalSourceOptions.SCHEMA_NAME); the Oracle example correctly keeps schema-names (its code key is plural).

Engine docs

  • docs/{en,zh}/engines/event-listener.md: the EventType table documented READER_OPEN, READER_CLOSE, WRITER_OPEN, WRITER_CLOSE, which do not exist in org.apache.seatunnel.api.event.EventType (there is no WRITER_OPEN at all). Replaced them with the real LIFECYCLE_* values and added the undocumented enum values (SCHEMA_CHANGE_CHANGE_COLUMN, SCHEMA_CHANGE_RENAME_TABLE, SCHEMA_CHANGE_ALTER_TABLE_COMMENT, SCHEMA_CHANGE_ALTER_COLUMN_COMMENT, SCHEMA_CHANGE_RESTORE, READER_MESSAGE_DELAYED), each mapped to the event class that actually returns it. Fixed the example imports (the classes live in org.apache.seatunnel.api.table.schema.event, org.apache.seatunnel.api.source.event, org.apache.seatunnel.api.sink.event, not org.apache.seatunnel.api.event.*) and the switch case labels.
  • docs/{en,zh}/engines/zeta/stain-trace.md: documented stain-trace-sample-interval as the engine parameter, but the canonical key is stain-trace-sample-rate (ServerConfigOptions.STAIN_TRACE_SAMPLE_RATE); the -interval spelling is only a backward-compatible alias in YamlSeaTunnelDomConfigProcessor. Now documents -rate as primary and mentions the alias.

Others

  • docs/{en,zh}/connectors/source/Iceberg.md: the table_list row now documents the per-item split tuning keys splitSize / splitLookback / splitOpenFileCost supported by SourceTableConfig (deserialized with a default Jackson mapper, so camelCase); the zh table's three Kerberos rows used no instead of 否 in the required column.
  • docs/{en,zh}/transforms/sql.md: plugin_input was typed string, but it is List<String> (ConnectorCommonOptions.PLUGIN_INPUT) and SQLTransform reads element 0; fixed the type and clarified the multi-table behavior.

Were both English and Chinese docs checked?

Yes. Every fix was applied to both docs/en and docs/zh where the same content exists in both languages. 30 files changed in total (15 en / 15 zh).

Duplicate check (last 7 days)

Checked all open docs PRs before starting: #12709, #12693, #12679, #12641, #12621, #12615, #12602, #12570, #12514 (another author), #12459. Several initially planned fixes were already covered by those PRs (e.g. PostgreSQL-CDC schema-name, SqlServer-CDC connect.timeout.ms, MongoDB-CDC format, engine-jar-storage-mode enable key, security.md enable-http default, telemetry.md endpoints, user-command.md checkpoint options, state-storage-and-recovery.md checkpoint keys/CLI/IMap names, rest-api-v2 /log port). All overlapping fixes were dropped from this PR; every remaining fix above was verified not to overlap with the diffs of those PRs.

Verification

  • Verified each claim against the source before editing: type converters (TypeConvertUtil, ClickhouseTypeConverter, plus the ClickHouseDataType object classes decompiled from clickhouse-client 0.3.2-patch11), option definitions (ObsFileBaseOptions, FileBaseSinkOptions, FileBaseSourceOptions, SourceOptions, ServerConfigOptions, EventType), factory option rules (LocalFileSourceFactory, Obs/Oss/Jindo sink factories) and event-class-to-EventType mappings.
  • Ran a table-structure check over all 30 changed files (column-count consistency per table): 0 issues.
  • Ran a relative-link check over all changed docs: 0 broken links.
  • Grepped the changed files for the old wrong keys/values (exactly-once =, hadoop_obs_properties, stain-trace-sample-interval:, port 9092, LocalFile { in OSS/COS examples): no leftovers.
  • Did not run the full Docusaurus build (pnpm install/build) because the changes are markdown-only and the table/link checks above cover the syntax surface touched; happy to run it if reviewers prefer.

@DanielLeens DanielLeens left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks a lot for this docs sweep, @zhangshenghang. Cross-checking docs against source is exactly the kind of work that keeps users out of trouble, and most of the corrections here are right. I traced every changed claim to the code at head 81961ee4. A few of them are not backed by the source, and one of them reverses a statement that was correct before, so I would like to see those fixed before merge.

What Problem Does This PR Solve?

Pain point: Several connector and engine docs had drifted from the code (wrong option names, missing sink options, outdated ClickHouse type tables, stale EventType names, a renamed stain-trace key, and so on).

Fix approach: Docs-only change across 15 en and 15 zh files, with no code or config touched. Each row/snippet is edited to match what the source declares.

One-sentence summary: A broadly accurate docs correction PR, but a handful of the "fixes" document behavior that the code does not implement, or contradict the code.

1. Code Change Review

1.1 Core Logic Analysis

There is no runtime change, so my review is claim-by-claim verification against source.

Verified correct (no action needed):

  • CDC cookbook: exactly_once is the real key (SourceOptions.EXACTLY_ONCE), and Postgres-CDC uses schema-name as a list (PostgresIncrementalSourceOptions.SCHEMA_NAME). Oracle-CDC keeps schema-names, which the PR correctly leaves alone.
  • ClickHouse source table: matches ClickHouseDataType in clickhouse-client 0.3.2-patch11 (Int8->Byte, UInt8/Int16->Short, UInt16/Int32->Integer, UInt32/UInt64/Int64->Long, DateTime/32/64->LocalDateTime) and TypeConvertUtil.
  • ClickHouse sink table: TINYINT/SMALLINT/INT/BIGINT/BOOLEAN/TIMESTAMP/TIME rows match ClickhouseTypeConverter.reconvert. Port 8123 is right for the HTTP JDBC client.
  • Iceberg table_list per-table splitSize / splitLookback / splitOpenFileCost: these are real fields of SourceTableConfig and are applied in IcebergScanSplitPlanner. They are only reachable through table_list (the single table path does not set them), which the doc wording reflects.
  • ObsFile source: ObsConf.buildWithReadonlyConfig only maps access_key / access_secret / endpoint, so removing the hadoop_obs_properties example is correct.
  • OssFile source archive_compress_codec, enable_file_split, file_split_size: the hadoop OssFile source extends BaseMultipleTableFileSource and goes through FileSplitStrategyFactory; formats text/json/csv/parquet and the 128 MB default match FileFormat.supportFileSplit() and FileBaseOptions.
  • EventType table and example imports: every enum constant and event class mapping matches EventType and the event classes' getEventType(). READER_OPEN/WRITER_OPEN/WRITER_CLOSE were indeed stale, and WriterOpenEvent does not exist.
  • stain-trace: stain-trace-sample-rate is the primary key and stain-trace-sample-interval is an alias (YamlSeaTunnelDomConfigProcessor).
  • SQL transform plugin_input: it is List<String> and only index 0 is used (SQLTransform constructor).
  • OssFile/CosFile (zh) CDC examples now use the right connector name and options.

Not backed by source (details in 1.4): LocalFile source file_format_type "required: no"; schema_save_mode / data_save_mode on BosFile, CosFile, ObsFile and OssJindoFile sinks; schema_evolution_enabled on BosFile; and the OBS STS paragraph.

Runtime path for the save-mode claim (to show why the docs overstate):

Job parse (MultipleTableJobConfigParser / JobMaster)
  -> sink instanceof SupportSaveMode ?  -> getSaveModeHandler()
BaseMultipleTableFileSink (Local/Oss/S3/Hdfs/Ftp/...) implements SupportSaveMode
  -> discoverFactory(CatalogFactory, pluginName) -> DefaultSaveModeHandler(schemaSaveMode, dataSaveMode)
BosFileSink / CosFileSink / ObsFileSink / jindo OssFileSink extend BaseFileSink
  -> no SupportSaveMode, no CatalogFactory registered -> the two options are never consumed

1.2 Compatibility Impact

Fully compatible. Docs only; no config keys, defaults, serialization or checkpoint behavior change.

1.3 Performance / Side-Effect Analysis

None (docs only).

1.4 Error Handling and Logging

Issue 1

  • Location: docs/en/connectors/source/LocalFile.md:57, docs/zh/connectors/source/LocalFile.md (same row)
  • Problem: file_format_type was changed from required to no. The factory rule lists it as optional, but the option has no default (FileBaseSourceOptions.FILE_FORMAT_TYPE is noDefaultValue()), and both BaseFileSourceConfig (readonlyConfig.get(FILE_FORMAT_TYPE)) and ReadStrategyFactory.of(readonlyConfig, ...) dereference it immediately (.name()). A job without it fails with an NPE, so the previous "yes" was correct and sibling docs (HdfsFile and others) still say "yes".
  • Risk: Users will omit the option on the strength of the docs and hit an opaque NPE at job start.
  • Best improvement: Revert this row to yes in both languages. The real inconsistency is the .optional(...) in LocalFileSourceFactory.optionRule(); if you want, that can be a small separate code PR (make it required, or add a sensible default).
  • Severity: High
  • Raised by another reviewer: No

Issue 2

  • Location: docs/en/connectors/sink/BosFile.md (new schema_save_mode, data_save_mode rows), CosFile.md, ObsFile.md, OssJindoFile.md, and the matching docs/zh/... files
  • Problem: These four sinks extend BaseFileSink, not BaseMultipleTableFileSink. Only the latter implements SupportSaveMode and calls discoverFactory(CatalogFactory, ...). There is no CatalogFactory for BosFile/CosFile/ObsFile/jindo OssFile (file catalog factories exist only for Ftp, Gcs, Hdfs, Local, Oss(hadoop), S3, Sftp and Smb). FileBaseSinkOptions.SCHEMA_SAVE_MODE / DATA_SAVE_MODE are therefore never consumed for these four sinks. (data_save_mode is only read into FileSinkConfig and acted upon in FileSinkAggregatedCommitter.shouldAppendData, and only for the ftp schema.) The factories also do not declare the options in their optionRule().
  • Risk: Documenting DROP_DATA / ERROR_WHEN_DATA_EXISTS / CREATE_SCHEMA_WHEN_NOT_EXIST for connectors that ignore them can lead users to expect directory cleanup or failure-on-existing-data that never happens. For a data-sink, a silently ignored "drop data" option is a real surprise.
  • Best improvement: Remove these rows from the four sinks (keep them on OssFile, which extends BaseMultipleTableFileSink and declares both in its factory). If the intent is to support them, that needs a code change (catalog factory plus moving to BaseMultipleTableFileSink) and its own PR/tests.
  • Severity: High
  • Raised by another reviewer: No

Issue 3

  • Location: docs/en/connectors/sink/BosFile.md (new schema_evolution_enabled row), docs/zh/connectors/sink/BosFile.md
  • Problem: SupportSchemaEvolutionSink (sink-level, consulted by MultiTableSink.supports()) is implemented only by BaseMultipleTableFileSink; BosFile extends BaseFileSink. Only the writer-level interface is implemented, so I could not find a path where the engine applies schema changes to a BosFile sink. The option is parsed in FileSinkConfig, but that alone does not make the feature work.
  • Risk: Users may enable CDC schema evolution on BosFile and not get it.
  • Best improvement: Please either drop the row for BosFile, or point to a test/source path that proves schema evolution works through BaseFileSink. (CosFile/ObsFile/OssJindoFile already carry this row from before; if you confirm it is not functional, those would deserve the same cleanup in a follow-up.)
  • Severity: Medium
  • Raised by another reviewer: No

Issue 4

  • Location: docs/en/connectors/source/ObsFile.md (STS section, last paragraph) and docs/zh/connectors/source/ObsFile.md
  • Problem: The PR now says the connector cannot pass a session token, but the section is still titled and framed as reading with STS temporary credentials, the example uses <temp-access-key> / <temp-secret-key>, and the same paragraph ends with "prefer STS-issued temporary credentials". Huawei STS temporary credentials always come with a security token, so "STS credentials must be issued without a session token binding" describes something that cannot exist. In short, with this connector STS credentials cannot be used.
  • Risk: The section is self-contradictory and still steers users toward a setup that will fail authentication.
  • Best improvement: State plainly that STS temporary credentials (which need a security token) are not supported by this connector today; remove or rework the example, and keep only the ECS Agency/long-lived-key guidance that the connector can actually honor, or drop the section until token support exists.
  • Severity: Medium
  • Raised by another reviewer: No

Issue 5

  • Location: docs/en/connectors/sink/Clickhouse.md (type mapping table), zh counterpart
  • Problem: The old table listed UInt8 / UInt16 under INT. The new table drops them entirely, but IntInjectFunction.isCurrentFieldType still accepts UInt8 and UInt16 (SeaTunnel Byte/Short/Int values are written into them), so those target types remain valid.
  • Risk: Minor: readers may think UInt8/UInt16 targets are unsupported.
  • Best improvement: Keep UInt8 / UInt16 on the INT row (or on SMALLINT/INT as appropriate) alongside the new rows.
  • Severity: Low
  • Raised by another reviewer: No

Issue 6

  • Location: docs/en/engines/event-listener.md:~33, docs/en/engines/zeta/stain-trace-quickstart.md (lines ~119, 252, 316, 466, 513, 532) and zh counterparts
  • Problem: (a) The EventType table says it lists the types "mainly including" but still omits STAIN_TRACE (StainTraceEvent). (b) The sibling stain-trace-quickstart.md still uses stain-trace-sample-interval everywhere while stain-trace.md now calls it a deprecated alias.
  • Risk: Docs inconsistency only; the alias still works.
  • Best improvement: Add the STAIN_TRACE row and align the quickstart on stain-trace-sample-rate (or note the alias there).
  • Severity: Low
  • Raised by another reviewer: No

Issue 7

  • Location: docs/en/transforms/sql.md (plugin_input), docs/en/connectors/source/Iceberg.md (table_list)
  • Problem: Two small clarity gaps. The SQL doc now types plugin_input as list<string> but does not say that the common single-string form still works. The Iceberg table_list text names the new keys but has no snippet, so camelCase splitSize vs the snake_case style used elsewhere is easy to miss.
  • Risk: Confusion only.
  • Best improvement: Add one sentence ("a single string is also accepted") and a short table_list example showing splitSize.
  • Severity: Low
  • Raised by another reviewer: No

2. Code Quality Assessment

2.1 Coding Standards

No code changes. Markdown tables are consistently formatted.

2.2 Test Coverage and Test Stability

N/A for docs. Stability: Stable (nothing executable changed). The suggested Issue 2/3 follow-ups would need real tests if the behavior is ever implemented.

2.3 Documentation Updates

en and zh are updated in lockstep for all 15 files, and the zh pages mirror the en changes, including the cleanup of a duplicated sheet_name row in zh ObsFile source, the zh Iceberg fix for untranslated column values, and the zh CosFile example fix. All Issues above apply to both languages.

3. Architectural Soundness

3.1 Elegance

Precise fix for most items; Issues 1 to 4 are cases where the docs were aligned to the option declarations rather than to the behavior the code actually implements.

3.2 Maintainability

Good intent. One suggestion: where a factory optionRule() is itself wrong (Issue 1), fix the code rather than documenting around it.

3.3 Extensibility

N/A.

3.4 Historical-Version Compatibility

No impact; no code, config or defaults changed.

4. Issue Summary

Number Issue Location Severity
1 LocalFile source file_format_type wrongly marked optional (NPE when omitted) docs/{en,zh}/connectors/source/LocalFile.md:57 High
2 schema_save_mode / data_save_mode documented for Bos/Cos/Obs/OssJindo sinks that ignore them docs/{en,zh}/connectors/sink/{BosFile,CosFile,ObsFile,OssJindoFile}.md High
3 schema_evolution_enabled documented for BosFile (BaseFileSink, no sink-level schema evolution support) docs/{en,zh}/connectors/sink/BosFile.md Medium
4 ObsFile source STS section is self-contradictory docs/{en,zh}/connectors/source/ObsFile.md Medium
5 ClickHouse sink table drops UInt8/UInt16 that are still writable docs/{en,zh}/connectors/sink/Clickhouse.md Low
6 STAIN_TRACE missing from EventType table; stain-trace-quickstart still uses the alias docs/{en,zh}/engines/event-listener.md, stain-trace-quickstart.md Low
7 Clarify plugin_input string form and add an Iceberg table_list split example docs/{en,zh}/transforms/sql.md, source/Iceberg.md Low

5. Merge Recommendation

Conclusion: Ready to merge after fixes

CI: The apache-side checks (Build, labeler, Notify test workflow) are green, and this is a docs-only change. mergeStateStatus is BLOCKED only because a review approval is still required. There are no earlier reviews on this PR.

Blockers (must fix):

  • Issue 1: revert the LocalFile file_format_type row to required.
  • Issue 2: remove schema_save_mode / data_save_mode from BosFile, CosFile, ObsFile and OssJindoFile (en and zh).

Recommended fixes (non-blocking): Issues 3 to 7.

Overall assessment: About 80 percent of the changes are accurate, well verified corrections and are a clear improvement; nice work on the CDC cookbook, ClickHouse type tables and EventType refresh. The remaining items document options that the code does not implement, so I would not want them to reach the published site. No better alternative approach is needed; this is just a matter of trimming the claims that source does not support.

@SEZ9 SEZ9 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for working on this. I reviewed the latest head 81961ee49afb.

What this PR fixes

  • User pain: several connector/engine pages drifted from the code — Clickhouse source/sink type tables claimed DateTime <-> TIME, the CDC cookbook used the non-existent keys exactly-once and (for Postgres) schema-names, ObsFile source showed a fictional hadoop_obs_properties option, OssFile/CosFile CDC examples used the LocalFile plugin name, event-listener.md listed READER_OPEN/WRITER_OPEN values that are not in EventType, and stain-trace.md documented the alias stain-trace-sample-interval instead of the canonical -rate key.
  • Fix approach: docs-only edits to 15 EN + 15 ZH pages — corrected type rows (TIME -> String, TIMESTAMP -> DateTime64, BOOLEAN -> Bool, split integer rows), fixed option keys and plugin names in examples, rewrote the OBS STS section, replaced the EventType table and example imports, flipped LocalFile file_format_type to optional, and added shared FileBaseSinkOptions rows (enable_header_write, schema_save_mode, data_save_mode, excel/csv options) to the BosFile, CosFile, ObsFile and OssJindoFile sink tables.
  • One-line summary: not mergeable as-is. The Clickhouse, cookbook, event-listener and stain-trace fixes check out against the code, but the new schema_save_mode/data_save_mode/schema_evolution_enabled rows are wrong for BosFile, CosFile, ObsFile and OssJindoFile because those sinks extend BaseFileSink (BaseFileSink.java:42-44, SeaTunnelSink only), not BaseMultipleTableFileSink (BaseMultipleTableFileSink.java:56-61, which carries SupportSaveMode/SupportSchemaEvolutionSink); and marking LocalFile file_format_type optional hides that in path mode the option is noDefaultValue() (FileBaseSourceOptions.java:60-63) and is dereferenced unconditionally in ReadStrategyFactory.of() (ReadStrategyFactory.java:36), so omitting it fails with an NPE.

Runtime chain I rechecked

LocalFile source `file_format_type` (docs/en/connectors/source/LocalFile.md:57, required -> no):
  LocalFileSourceFactory.createSource() -> new LocalFileSource(options, tables)   LocalFileSourceFactory.java:54
    LocalFileSource(..) -> new MultipleTableLocalFileSourceConfig(..)   LocalFileSource.java:32
      BaseMultipleTableFileSourceConfig(..) -> no TABLE_CONFIGS -> single-path branch   BaseMultipleTableFileSourceConfig.java:44-46
        MultipleTableLocalFileSourceConfig.getBaseSourceConfig() -> new LocalFileSourceConfig(..)   MultipleTableLocalFileSourceConfig.java:37
          BaseFileSourceConfig(..) -> readonlyConfig.get(FILE_FORMAT_TYPE) [noDefaultValue, FileBaseSourceOptions.java:60-63]   BaseFileSourceConfig.java:74
          -> ReadStrategyFactory.of(readonlyConfig, hadoopConf)   BaseFileSourceConfig.java:75
            -> readonlyConfig.get(FILE_FORMAT_TYPE).name()  (NPE when absent)   ReadStrategyFactory.java:36

File sink save-mode / schema-evolution rows (BosFile/CosFile/ObsFile/OssJindoFile sink docs):
  BosFileSink extends BaseFileSink   BosFileSink.java:27
  CosFileSink extends BaseFileSink   CosFileSink.java:27
  ObsFileSink extends BaseFileSink   ObsFileSink.java:27
  jindo OssFileSink extends BaseFileSink   connector-file-jindo-oss/.../OssFileSink.java:27
    BaseFileSink implements SeaTunnelSink only (no SupportSaveMode / SupportSchemaEvolutionSink)   BaseFileSink.java:42-44
  vs. LocalFileSink / oss OssFileSink extends BaseMultipleTableFileSink   LocalFileSink.java:28, connector-file-oss/.../OssFileSink.java:28
    BaseMultipleTableFileSink implements SupportMultiTableSink, SupportSaveMode, SupportSchemaEvolutionSink   BaseMultipleTableFileSink.java:56-61
    getSaveModeHandler() reads SCHEMA_SAVE_MODE / DATA_SAVE_MODE   BaseMultipleTableFileSink.java:164-165
    supports() gated by fileSinkConfig.isSchemaEvolutionEnabled()   BaseMultipleTableFileSink.java:134-143

Clickhouse sink type table (docs/en/connectors/sink/Clickhouse.md: TIME -> String, TIMESTAMP -> DateTime64):
  ClickhouseTypeConverter.reconvert(): case TIME / case STRING -> ClickhouseType.STRING   ClickhouseTypeConverter.java:95-98
  ClickhouseTypeConverter.reconvert(): case TIMESTAMP -> DateTime64(scale)   ClickhouseTypeConverter.java:110-121
  ClickhouseTypeConverter.reconvert(): case BIGINT -> ClickhouseType.BIGINT = "Int64"   ClickhouseTypeConverter.java:79-82, ClickhouseType.java:33

Findings

Issue 1: New schema_save_mode / data_save_mode (and BosFile schema_evolution_enabled) rows are added to ObsFile, BosFile, CosFile and OssJindoFile sinks, but those four sinks extend BaseFileSink, which implements neither SupportSaveMode nor SupportSchemaEvolutionSink, so the documented options have no effect there.

  • Location: docs/en/connectors/sink/ObsFile.md:94
  • Why it matters: - The PR description justifies these rows by pointing at BaseMultipleTableFileSink, which reads FileBaseSinkOptions.SCHEMA_SAVE_MODE / DATA_SAVE_MODE unconditionally in getSaveModeHandler() (BaseMultipleTableFileSink.java:164-165). That is true, but only for sinks that extend it. ObsFileSink.java:27, BosFileSink.java:27, CosFileSink.java:27 and the jindo OssFileSink.java:27 all declare extends BaseFileSink, and BaseFileSink.java:42-44 is public abstract class BaseFileSink implements SeaTunnelSink<...> only — no SupportSaveMode, no SupportSchemaEvolutionSink, no getSaveModeHandler() or supports() override.
  • Consequence: for these four connectors the engine never invokes a save-mode handler, so schema_save_mode = RECREATE_SCHEMA or data_save_mode = DROP_DATA is silently ignored and existing files are kept. Likewise schema_evolution_enabled on BosFile is read into FileSinkConfig (FileSinkConfig.java:226) but nothing in BaseFileSink exposes supports(), so no schema-change events are applied to the sink.
  • By contrast, LocalFileSink.java:28 and the oss OssFileSink.java:28 extend BaseMultipleTableFileSink (BaseMultipleTableFileSink.java:56-61), which is why the sibling docs that these rows were copied from are correct.
  • Fix: drop the schema_save_mode / data_save_mode rows from the ObsFile, BosFile, CosFile and OssJindoFile sink pages (EN and ZH) and the schema_evolution_enabled row from BosFile, or land a code change migrating those sinks to BaseMultipleTableFileSink first and document the options with that change.
  • Evidence: docs/en/connectors/sink/ObsFile.md:95 | data_save_mode | Enum | no | APPEND_DATA | Controls how existing data files in the target directory are processed before the synchronization task starts.; docs/en/connectors/sink/BosFile.md:93 | schema_evolution_enabled | boolean | no | false | Enable schema evolution support for CDC pipelines. ...; docs/en/connectors/sink/BosFile.md:94 | schema_save_mode | Enum | no | CREATE_SCHEMA_WHEN_NOT_EXIST | Controls how the target directory is treated before the synchronization task starts.
  • Suggested fix: ObsFileSink extends BaseFileSink (ObsFileSink.java:27), and BaseFileSink only implements SeaTunnelSink<...> (BaseFileSink.java:42-44) — it does not implement SupportSaveMode, so it never reads FileBaseSinkOptions.SCHEMA_SAVE_MODE / DATA_SAVE_MODE. Those are only consumed in BaseMultipleTableFileSink.getSaveModeHandler() (BaseMultipleTableFileSink.java:164-165), which this connector does not use; the same applies to BosFile, CosFile and OssJindoFile. Documenting schema_save_mode / data_save_mode here tells users they can set DROP_DATA / RECREATE_SCHEMA while the engine silently ignores it. Please remove these two rows (and schema_evolution_enabled on BosFile) from the four BaseFileSink-based sinks, or move those sinks to BaseMultipleTableFileSink in a code change first.
  • Severity: High

Issue 2: LocalFile source file_format_type is flipped from required to optional, but in path mode the option has no default and ReadStrategyFactory.of() dereferences it unconditionally, so omitting it crashes the job with an NPE.

  • Location: docs/en/connectors/source/LocalFile.md:57
  • Why it matters: - Root cause: the change relies on LocalFileSourceFactory.optionRule() registering LocalFileSourceOptions.FILE_FORMAT_TYPE via .optional(...) (LocalFileSourceFactory.java:61). But the option is declared with .noDefaultValue() (FileBaseSourceOptions.java:60-63), and the runtime path dereferences it unconditionally: BaseFileSourceConfig reads it at BaseFileSourceConfig.java:74 and immediately calls ReadStrategyFactory.of(readonlyConfig, hadoopConf) at line 75, which does readonlyConfig.get(FileBaseSourceOptions.FILE_FORMAT_TYPE).name() (ReadStrategyFactory.java:36). With path configured and no file_format_type, get() returns null and .name() throws a NullPointerException during source construction.
  • The factory marks it optional only because the same OptionRule also covers the tables_configs branch (LocalFileSourceFactory.java:60, .exclusive(TABLE_CONFIGS, FILE_PATH)), where the format can be supplied per table entry. The doc table at docs/en/connectors/source/LocalFile.md:57 describes the path form, where the option is effectively mandatory.
  • Impact: a user following the updated table and omitting file_format_type gets an NPE with no hint about the missing option.
  • Fix: keep Required = yes for file_format_type in both EN (docs/en/connectors/source/LocalFile.md:57) and ZH (docs/zh/connectors/source/LocalFile.md:57), optionally adding a note that it may instead be specified inside each tables_configs entry.
  • Evidence: docs/zh/connectors/source/LocalFile.md:57 | file_format_type | string | 否 | - |
  • Suggested fix: I don't think this should be flipped to no. The factory marks it .optional(...) (LocalFileSourceFactory.java:61) only because the same rule also covers the tables_configs branch, but the option is noDefaultValue() (FileBaseSourceOptions.java:60-63) and BaseFileSourceConfig.java:74-75 goes straight into ReadStrategyFactory.of(), which does readonlyConfig.get(FileBaseSourceOptions.FILE_FORMAT_TYPE).name() (ReadStrategyFactory.java:36) — omitting it in path mode is an NPE at source construction. Please keep yes here and in the zh page (optionally noting that it can be set per tables_configs entry instead).
  • Severity: High

Issue 3: ObsFile 'Temporary Security Credentials (OBS STS)' section now shows an example that cannot work with STS credentials and effectively steers users to put long-lived AK/SK into job files

  • Location: docs/en/connectors/source/ObsFile.md:445
  • Why it matters: - Root cause: the rewritten section keeps the STS title and the OBS STS link but drops the session token, then states that 'STS credentials must be issued without a session token binding' (docs/en/connectors/source/ObsFile.md:445). Huawei Cloud temporary AK/SK are only valid together with their security token, and the OBSA Hadoop client authenticates temporary keys through fs.obs.session.token. ObsConf.buildWithReadonlyConfig (connector-file-obs/.../config/ObsConf.java:45-53) only sets Constants.ACCESS_KEY, Constants.SECRET_KEY and Constants.ENDPOINT, and the OBS connector exposes no hdfs_site_path / Hadoop-properties pass-through and no fs.obs.security.provider hook, so neither STS credentials nor an ECS Agency can be wired in.
  • Impact: the only credentials that work in access_key / access_secret are a permanent key pair, which is exactly what the closing sentence tells users to avoid; the section is internally contradictory and the 'provider jar must be on the runtime classpath' sentence refers to a provider that cannot be configured.
  • Fix: say plainly that ObsFile currently supports only static AK/SK (STS temporary credentials and ECS Agency are not supported), recommend a least-privilege bucket-prefix policy and key rotation, and remove the 'issue STS credentials without a session token' guidance and the provider-jar sentence. Apply the same change to docs/zh/connectors/source/ObsFile.md:187.
  • Evidence: docs/en/connectors/source/ObsFile.md:445 The connector only maps access_key, access_secret, and endpoint into the Hadoop OBS configuration; there is no pass-through for additional Hadoop OBS properties such as a session token, so STS credentials must be issued without a session token binding.; docs/zh/connectors/source/ObsFile.md:187 连接器只会将 access_key、access_secret、endpoint 三个选项映射到 Hadoop OBS 配置中,不支持透传其他 Hadoop OBS 属性(例如 session token),因此使用的 STS 临时凭证不能绑定 session token。
  • Suggested fix: Huawei OBS temporary AK/SK are only valid together with their security token, and the OBSA client needs fs.obs.session.token to use them. Since ObsConf.buildWithReadonlyConfig only sets ACCESS_KEY / SECRET_KEY / ENDPOINT (ObsConf.java:45-53) and the connector exposes no hdfs_site_path / Hadoop-properties pass-through, this example cannot authenticate with STS output at all — the only thing that works in access_key / access_secret is a permanent key pair, which is exactly what the next sentence tells users to avoid. The ECS Agency recommendation is equally unreachable (no fs.obs.security.provider hook). I'd rather we say plainly that ObsFile currently supports only static AK/SK (STS / ECS Agency not supported), recommend a least-privilege bucket-prefix policy and rotation, and drop the 'issue STS credentials without a session token' guidance and the provider-jar sentence. Same change needed in the zh page (line 187).
  • Severity: Medium

Issue 4: OssFile source doc adds enable_file_split / file_split_size, but OssFileSourceFactory.optionRule() does not declare them (LocalFileSourceFactory does); the doc should note the limitation or the factory should be aligned in a follow-up

  • Location: docs/en/connectors/source/OssFile.md:241
  • Why it matters: - Root cause: the rows are copied from sibling docs. LocalFileSourceFactory.java:91-102 declares ENABLE_FILE_SPLIT and FILE_SPLIT_SIZE, but OssFileSourceFactory.optionRule() (OssFileSourceFactory.java:57 onwards) only declares ARCHIVE_COMPRESS_CODEC (line 100) and never lists the split options.
  • Impact: the options do take effect at runtime because FileSplitStrategyFactory.initFileSplitStrategy() reads them from the base ReadonlyConfig with defaults (FileSplitStrategyFactory.java:39,66), so the doc is not wrong about behavior, but option introspection / validation for OssFile will not list them. Additionally, when enable_file_split = true, FileSplitStrategyFactory.java:42-43 dereferences FILE_FORMAT_TYPE (fileFormat.supportFileSplit()), so file_format_type must be set explicitly for the split path not to NPE.
  • Fix: add a short note in EN and ZH that these options come from the shared file-source base and that file_format_type must be set when enable_file_split = true; a follow-up adding the two options to OssFileSourceFactory.optionRule() would be the cleaner solution.
  • Evidence: docs/en/connectors/source/OssFile.md:242 | file_split_size | long | no | 134217728 | Only used when enable_file_split is true. The size of each split in bytes, default 128 MB (134217728).; docs/en/connectors/source/OssFile.md:241 | enable_file_split | boolean | no | false | Only used when file_format_type is text, json, csv or parquet. ...; docs/en/connectors/source/OssFile.md:242 | file_split_size | long | no | 134217728 | Only used when enable_file_split is true. ...
  • Suggested fix: These two options are honored at runtime via FileSplitStrategyFactory (base config read with defaults, FileSplitStrategyFactory.java:39,66), but unlike LocalFileSourceFactory (lines 91-102) the OssFileSourceFactory.optionRule() does not declare ENABLE_FILE_SPLIT / FILE_SPLIT_SIZE, so option introspection for OssFile will not show them. Please add a note here (and in zh) that they come from the shared file-source base, and that file_format_type must be set explicitly when enable_file_split = true (FileSplitStrategyFactory.java:42-43 dereferences it). A follow-up adding them to the OSS factory rule would be the cleaner fix.
  • Severity: Low

Issue 5: ObsFile/BosFile sink: most of the newly documented rows (tmp_path, encoding, csv_string_quote_mode, enable_header_write, schema_save_mode, data_save_mode, excel/CDC options) are not in the respective *FileSinkFactory.optionRule()

  • Location: docs/en/connectors/sink/ObsFile.md:89
  • Why it matters: - Root cause: the rows are justified by the shared sink config reading them unconditionally — FileSinkConfig reads TMP_PATH / ENCODING / CSV_STRING_QUOTE_MODE (FileSinkConfig.java:129,133,217), which is correct for every BaseFileSink subclass. But ObsFileSinkFactory.optionRule() (ObsFileSinkFactory.java:41-96) declares only FILENAME_EXTENSION out of the seven options added to docs/en/connectors/sink/ObsFile.md:89-95, and BosFileSinkFactory.optionRule() (BosFileSinkFactory.java:43-114) declares ENCODING, ENABLE_HEADER_WRITE, TMP_PATH and the two PARQUET_AVRO_* options but none of max_rows_in_memory, sheet_max_rows, sheet_name, csv_string_quote_mode, merge_update_event, schema_evolution_enabled, schema_save_mode, data_save_mode.
  • Impact: the OptionRule is what the engine and UI use for option validation and discovery, so the documented tables and the factory rules now disagree; users relying on introspection will not see these options. (The schema_save_mode / data_save_mode / schema_evolution_enabled rows have the separate, more serious problem that BaseFileSink does not act on them at all — see the dedicated finding.)
  • Fix: either call out in the PR description that these rows are shared-base options not declared by the factories, or add the corresponding .optional(...) entries to ObsFileSinkFactory and BosFileSinkFactory in a follow-up so the OptionRule matches the docs.
  • Evidence: docs/en/connectors/sink/ObsFile.md:94 | schema_save_mode | Enum | no | CREATE_SCHEMA_WHEN_NOT_EXIST | Controls how the target directory is treated ...; docs/en/connectors/sink/BosFile.md:90 | csv_string_quote_mode | enum | no | MINIMAL | Only used when file_format is csv.; docs/en/connectors/sink/BosFile.md:94 | schema_save_mode | Enum | no | CREATE_SCHEMA_WHEN_NOT_EXIST | Controls how the target directory is treated ...
  • Suggested fix: tmp_path, encoding and csv_string_quote_mode are indeed read by FileSinkConfig (FileSinkConfig.java:129,133,217), but ObsFileSinkFactory.optionRule() (ObsFileSinkFactory.java:41-96) only declares FILENAME_EXTENSION out of the seven options added here, and BosFileSinkFactory is missing most of the excel/csv/cdc/save-mode rows added in BosFile.md too. Could you call that out in the PR description, or add the corresponding .optional(...) entries to the two factories in a follow-up so the OptionRule matches the docs?
  • Severity: Low

Issue 6: Clickhouse sink type table now mixes two semantics: TINYINT/SMALLINT/INT/TIMESTAMP/TIME rows follow ClickhouseTypeConverter.reconvert, but BIGINT still lists UInt32 / UInt64 / Interval* that reconvert never emits

  • Location: docs/en/connectors/sink/Clickhouse.md:68
  • Why it matters: - Root cause: ClickhouseTypeConverter.reconvert maps BIGINT to ClickhouseType.BIGINT = "Int64" only (ClickhouseTypeConverter.java:79-82, ClickhouseType.java:33), just as it maps TINYINT -> Int8, SMALLINT -> Int16, INT -> Int32, BOOLEAN -> Bool, TIMESTAMP -> DateTime64(n) and TIME -> String. The PR rewrote the integer, boolean and temporal rows strictly from that converter but left the BIGINT row (docs/en/connectors/sink/Clickhouse.md:68) with Int64 / UInt32 / UInt64 / IntervalYear ... IntervalSecond, which are target column types the writer can accept, not types the converter generates.
  • Impact: within one table, some rows now describe the DDL emitted for save_mode_create_template while the BIGINT (and STRING) rows describe write compatibility; a reader cannot tell which semantics applies to which row.
  • Fix: either reduce the BIGINT row to Int64 and add a sentence above the table saying it describes the auto-created column types, or keep write-compatibility semantics consistently across all rows. The same row exists in docs/zh/connectors/sink/Clickhouse.md:62.
  • Evidence: docs/en/connectors/sink/Clickhouse.md:74 | TIMESTAMP | DateTime64 |; docs/en/connectors/sink/Clickhouse.md:65 | TINYINT | Int8 |; docs/en/connectors/source/Clickhouse.md:43 | Int8 | TINYINT |
  • Suggested fix: The new TINYINT/SMALLINT/INT/TIMESTAMP/TIME rows follow ClickhouseTypeConverter.reconvert, but that converter maps BIGINT to ClickhouseType.BIGINT = "Int64" only (ClickhouseTypeConverter.java:79-82, ClickhouseType.java:33); UInt32 / UInt64 / Interval* are never generated. Could we either make this row Int64 and add a sentence above the table saying it describes the auto-created column types, or keep the write-compatibility semantics consistently across all rows? Same row in docs/zh/connectors/sink/Clickhouse.md:62.
  • Severity: Low

Issue 7: Clickhouse sink type table mixes DDL-generation mappings with write-compatibility mappings, so the new BIGINT/TIME rows describe two different things under one header; source table still omits Bool/UUID/IPv4/IPv6 that TypeConvertUtil produces

  • Location: docs/en/connectors/sink/Clickhouse.md:75
  • Why it matters: - Root cause: the new rows TIMESTAMP -> DateTime64, TIME -> String, BOOLEAN -> Bool, TINYINT -> Int8 are taken from ClickhouseTypeConverter.reconvert() (ClickhouseTypeConverter.java:62-122), which only runs when generating DDL for save_mode_create_template. In the same table BIGINT -> Int64 / UInt32 / UInt64 / Interval* (docs/en/connectors/sink/Clickhouse.md:68) and STRING -> String / Int128 / UInt128 / ... (line 64) are write-compatibility statements — reconvert emits only Int64 and String for those. The two semantics are interleaved without any header or note explaining which rows mean what.
  • Source table: TypeConvertUtil.convert() maps Boolean to BOOLEAN_TYPE (TypeConvertUtil.java:78-79) and UUID, Inet4Address, Inet6Address to STRING_TYPE (TypeConvertUtil.java:96-101), but the rewritten source table (docs/en/connectors/source/Clickhouse.md:42-53) has no Bool, UUID, IPv4 or IPv6 rows.
  • Fix: add a short note (or split the table) distinguishing auto-create DDL rows from write-compatibility rows in the sink doc, and add Bool -> BOOLEAN and UUID / IPv4 / IPv6 -> STRING rows to the source table, in both EN and ZH.
  • Evidence: docs/en/connectors/sink/Clickhouse.md:75 | TIME | String |; docs/en/connectors/source/Clickhouse.md:51 | DateTime / DateTime32 / DateTime64 | TIMESTAMP |
  • Suggested fix: TIME -> String and TIMESTAMP -> DateTime64(n) come from ClickhouseTypeConverter.reconvert(), i.e. the DDL emitted for save_mode_create_template, while the BIGINT -> Int64 / UInt32 / UInt64 / Interval* and STRING -> Int128 / ... rows above describe which existing ClickHouse columns a SeaTunnel type can be written into (reconvert only ever emits Int64 / String). Mixing both in one table is confusing; could you add a short note (or split the table) saying which rows are auto-create DDL vs write compatibility? While here, the source table could also gain Bool -> BOOLEAN and UUID / IPv4 / IPv6 -> STRING, which TypeConvertUtil.convert() produces (TypeConvertUtil.java:78-79, 96-101).
  • Severity: Low

Issue 8: event-listener EventType table was rewritten from the enum but still omits STAIN_TRACE, so the table is again not the full enum it claims to document

  • Location: docs/en/engines/event-listener.md:44
  • Why it matters: - Root cause: EventType.java:21-39 contains 17 constants; the rewritten table (docs/en/engines/event-listener.md:27-44) now lists the SCHEMA_CHANGE_*, LIFECYCLE_*, READER_MESSAGE_DELAYED and JOB_STATUS values but not STAIN_TRACE (EventType.java:38), which is emitted by StainTraceEvent (StainTraceEvent.java:35) — the feature documented in docs/en/engines/zeta/stain-trace.md, also touched by this PR.
  • Impact: the paragraph above the table says the enum 'defines all possible event types', and the example at lines 220-230 encourages a switch (event.getEventType()) handler; a user building that switch from the table will not handle stain-trace events.
  • Fix: add a STAIN_TRACE row (associated class StainTraceEvent) to the EN and ZH tables.
  • Evidence: docs/en/engines/event-listener.md:44 | READER_MESSAGE_DELAYED | Reader message delayed event |MessageDelayedEvent |
  • Suggested fix: Thanks for aligning this table with EventType — the LIFECYCLE_* rename and the package fixes in the example are correct. One value is still missing: EventType.STAIN_TRACE (EventType.java:38), emitted by StainTraceEvent (StainTraceEvent.java:35), which the stain-trace docs touched in this PR rely on. Since the paragraph above says the enum "defines all possible event types", could you add a STAIN_TRACE row (with StainTraceEvent as the event class) here and in the zh table?
  • Severity: Low

Review conclusion

Conclusion: can merge after the blocking items are fixed

1. Blocking items

  • Issue 1: New schema_save_mode / data_save_mode (and BosFile schema_evolution_enabled) rows are added to ObsFile, BosFile, CosFile and OssJindoFile sinks, but those four sinks extend BaseFileSink, which implements neither SupportSaveMode nor SupportSchemaEvolutionSink, so the documented options have no effect there.
  • Issue 2: LocalFile source file_format_type is flipped from required to optional, but in path mode the option has no default and ReadStrategyFactory.of() dereferences it unconditionally, so omitting it crashes the job with an NPE.

2. Remaining follow-ups

  • Issue 3: ObsFile 'Temporary Security Credentials (OBS STS)' section now shows an example that cannot work with STS credentials and effectively steers users to put long-lived AK/SK into job files
  • Issue 4: OssFile source doc adds enable_file_split / file_split_size, but OssFileSourceFactory.optionRule() does not declare them (LocalFileSourceFactory does); the doc should note the limitation or the factory should be aligned in a follow-up
  • Issue 5: ObsFile/BosFile sink: most of the newly documented rows (tmp_path, encoding, csv_string_quote_mode, enable_header_write, schema_save_mode, data_save_mode, excel/CDC options) are not in the respective *FileSinkFactory.optionRule()
  • Issue 6: Clickhouse sink type table now mixes two semantics: TINYINT/SMALLINT/INT/TIMESTAMP/TIME rows follow ClickhouseTypeConverter.reconvert, but BIGINT still lists UInt32 / UInt64 / Interval* that reconvert never emits
  • Issue 7: Clickhouse sink type table mixes DDL-generation mappings with write-compatibility mappings, so the new BIGINT/TIME rows describe two different things under one header; source table still omits Bool/UUID/IPv4/IPv6 that TypeConvertUtil produces
  • Issue 8: event-listener EventType table was rewritten from the enum but still omits STAIN_TRACE, so the table is again not the full enum it claims to document

Thanks for the updates so far. Happy to discuss the remaining points.

…ired, drop unsupported save-mode rows from BaseFileSink sinks, restore writable UInt types, add STAIN_TRACE row, use canonical stain-trace-sample-rate key
@zhangshenghang

Copy link
Copy Markdown
Member Author

Thanks @DanielLeens and @SEZ9 — addressed on head 2433602e:

Issue 1 (must-fix): reverted file_format_type to required in LocalFile (en/zh) — you're right that FileBaseSourceOptions.FILE_FORMAT_TYPE has noDefaultValue() and ReadStrategyFactory dereferences it unconditionally.

Issue 2 (must-fix): removed the schema_save_mode / data_save_mode rows from BosFile, CosFile, ObsFile and OssJindoFile (en/zh, 24 rows total). Those sinks extend BaseFileSink which implements only SeaTunnelSink — the rows belong to BaseMultipleTableFileSink sinks only.

Issue 3: the schema_evolution_enabled row on BosFile is removed as part of the same cleanup (also BaseFileSink, no SupportSchemaEvolutionSink).

Issue 5: restored UInt8 / UInt16 (and Int8 / Int16) into the sink table's INT row (en/zh).

Issue 6: added the STAIN_TRACE row to the EventType table (en/zh) and switched stain-trace-quickstart.md to the canonical stain-trace-sample-rate key (-interval remains only as a code-level compatibility alias).

Issues 4 and 7 (ObsFile STS section rewrite, plugin_input string-form wording and the Iceberg table_list split example): will take these in a follow-up to keep this review round tight — happy to fold them in here instead if you prefer.

Website build was green at 81961ee4; this round only touches existing tables/rows, so I expect the same. Ready for re-review.

@DanielLeens DanielLeens left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the quick turnaround, @zhangshenghang. I re-reviewed the latest head 2433602e from scratch (not just the incremental commit) and traced every changed claim back to source again. Both blockers from my last round are now closed, which is great. I also read @SEZ9's review and your reply, and I agree with the direction of the fixes. A few small leftovers are listed below, none of which block merge.

What Problem Does This PR Solve?

Pain point: Several connector and engine docs had drifted from the code (wrong option names, missing sink options, outdated ClickHouse type tables, stale EventType values, a renamed stain-trace key).

Fix approach: Docs-only edits to 15 en and 15 zh files; no code or config touched. Each row or snippet is aligned with what the source declares.

One-sentence summary: A broadly accurate docs correction PR whose two previously incorrect claims (LocalFile file_format_type, save-mode rows on BaseFileSink sinks) are now fixed.

1. Code Change Review

1.1 Core Logic Analysis

There is no runtime change, so the review is claim-by-claim verification against source at head 2433602e.

Status of my previous blockers and issues (all verified on the new head):

  • Previous Issue 1 (LocalFile file_format_type): fixed. Both docs/en/connectors/source/LocalFile.md and the zh page say yes again, which matches FileBaseSourceOptions.FILE_FORMAT_TYPE (noDefaultValue()) being dereferenced in ReadStrategyFactory.of(). This also resolves @SEZ9's Issue 2.
  • Previous Issue 2 (schema_save_mode / data_save_mode on Bos/Cos/Obs/OssJindo sinks): fixed. All four rows are gone in en and zh, and BosFileSink, CosFileSink, ObsFileSink and the jindo OssFileSink all extends BaseFileSink (no SupportSaveMode). This resolves @SEZ9's Issue 1.
  • Previous Issue 3 (BosFile schema_evolution_enabled): the row is removed. See new Issue 1 below for a side effect on Cos/Obs/OssJindo.
  • Previous Issue 5 (ClickHouse sink UInt8 / UInt16): fixed, the INT row is now Int8 / UInt8 / Int16 / UInt16 / Int32 in en and zh.
  • Previous Issue 6 (STAIN_TRACE in the EventType table): fixed in en and zh. The quickstart alignment is only half done, see new Issue 2.
  • Previous Issues 4 (ObsFile STS) and 7 (plugin_input string form, Iceberg example): not changed yet; you said you would take them in a follow-up. Still open and non-blocking (carried over below).

Runtime path I re-traced for the save-mode and schema-evolution claims (unchanged conclusion):

Job parse (MultipleTableJobConfigParser)
  -> sink instanceof SupportSaveMode ?  -> getSaveModeHandler()
BaseMultipleTableFileSink (Local/Oss/S3/Hdfs/Ftp...) implements SupportSaveMode, SupportSchemaEvolutionSink
BosFileSink / CosFileSink / ObsFileSink / jindo OssFileSink extend BaseFileSink
  -> implements only SeaTunnelSink; no CatalogFactory registered
  -> schema_save_mode / data_save_mode are never consumed (correctly no longer documented)

1.2 Compatibility Impact

Fully compatible. Docs only; no config keys, defaults, serialization or checkpoint behavior change.

1.3 Performance / Side-Effect Analysis

None (docs only).

1.4 Error Handling and Logging

No blocking issues found. Remaining items, all non-blocking:

Issue 1: Cos/Obs/OssJindo sink docs now have a half-removed schema_evolution_enabled

  • Location: docs/en/connectors/sink/CosFile.md:268-293, docs/en/connectors/sink/ObsFile.md:310-335, docs/en/connectors/sink/OssJindoFile.md:276-301 and the zh counterparts
  • Problem: The latest commit removes the schema_evolution_enabled row from the option tables of these three sinks, but the ### schema_evolution_enabled [boolean] detail sections and the CDC examples with schema_evolution_enabled = true are still there. The page now says in one place that the option does not exist and in another how to use it. This row existed on dev before this PR, so it is also a behavior-of-docs change beyond the original "docs drifted from code" scope.
  • Risk: Confusing for readers either way. Keep in mind these sinks extend BaseFileSink, so I still could not find a path where the engine applies schema changes to them (same reasoning as before), but I would rather not half-remove a documented option.
  • Best improvement: Option A: restore the three table rows and leave the schema-evolution question for a dedicated follow-up that proves or disproves support. Option B: if you are confident it is unsupported, remove the detail sections and the CDC examples too, in en and zh.
  • Severity: Medium
  • Raised by another reviewer: No

Issue 2: English stain-trace quickstart still uses the alias

  • Location: docs/en/engines/zeta/stain-trace-quickstart.md:119, 252, 316, 466, 513, 532
  • Problem: Your reply says the quickstart was switched to stain-trace-sample-rate, but only the zh quickstart changed in this PR (12 lines). The en quickstart still uses stain-trace-sample-interval in six places while stain-trace.md calls it an alias. So en and zh are now inconsistent.
  • Risk: Docs inconsistency only; the alias still works (YamlSeaTunnelDomConfigProcessor).
  • Best improvement: Apply the same -interval to -rate replacement to the en quickstart (the table at line 316 should be renamed too).
  • Severity: Low
  • Raised by another reviewer: No (related to my previous Issue 6)

Issue 3: ObsFile source STS section is still self-contradictory (carryover from my previous Issue 4)

  • Location: docs/en/connectors/source/ObsFile.md:428-445 and zh
  • Problem: The section is titled "Reading with Temporary Security Credentials (OBS STS)" and shows <temp-access-key> / <temp-secret-key>, yet the last paragraph says there is no session-token pass-through, so STS credentials "must be issued without a session token binding". Huawei STS credentials always carry a security token, so the example cannot work as described. This also relates to @SEZ9's Issue 3.
  • Risk: Steers users toward a setup that fails authentication.
  • Best improvement: State plainly that STS temporary credentials (which need a security token) are not supported by this connector today and drop or rework the example. Happy for this to be the follow-up you mentioned.
  • Severity: Medium
  • Raised by another reviewer: Yes (@SEZ9, Issue 3)

Issue 4: Small clarity gaps (carryover from my previous Issue 7) and factory/doc drift

  • Location: docs/en/transforms/sql.md:15,20 (plugin_input), docs/en/connectors/source/Iceberg.md (table_list), docs/en/connectors/source/OssFile.md:241-242
  • Problem: (a) plugin_input is typed list<string> but the doc does not say a single string still works (the example at line 51 uses one). (b) The Iceberg table_list text names splitSize etc. without a snippet. (c) +1 to @SEZ9's Issues 4 and 5: enable_file_split / file_split_size are honored at runtime via FileSplitStrategyFactory but are not declared in OssFileSourceFactory.optionRule(), and several newly documented Bos/Obs sink rows are not in their factories' optionRule(); that gap is best closed by a small code follow-up, not by this docs PR.
  • Risk: Confusion only.
  • Best improvement: One sentence for (a), a short example for (b), and a follow-up code PR for (c) if you want option introspection to match the docs.
  • Severity: Low
  • Raised by another reviewer: Partly (@SEZ9, Issues 4 and 5, for item c)

2. Code Quality Assessment

2.1 Coding Standards

No code changes. Markdown tables are consistently formatted. One cosmetic nit: the LocalFile row now reads | yes | with an extra space, which renders fine.

2.2 Test Coverage and Test Stability

N/A for docs. Stability: Stable (nothing executable changed).

2.3 Documentation Updates

en and zh are updated in lockstep for all changed pages except the en stain-trace quickstart (Issue 2). The website build and apache-side checks are green on this head.

3. Architectural Soundness

3.1 Elegance of the Solution

Precise fix for the verified claims. The two earlier overstatements are now removed.

3.2 Maintainability

Good. Where a factory optionRule() is itself wrong (LocalFile file_format_type is .optional), a small code PR is the right place to fix it.

3.3 Extensibility

N/A.

3.4 Historical-Version Compatibility

No impact; no code, config or defaults changed.

4. Issue Summary

Number Issue Location Severity
1 Cos/Obs/OssJindo schema_evolution_enabled row removed but detail section and example kept docs/{en,zh}/connectors/sink/{CosFile,ObsFile,OssJindoFile}.md Medium
3 ObsFile source STS section self-contradictory (carryover, also @SEZ9) docs/{en,zh}/connectors/source/ObsFile.md:428-445 Medium
2 en stain-trace quickstart still uses the alias docs/en/engines/zeta/stain-trace-quickstart.md Low
4 plugin_input string form, Iceberg example, OssFile/Bos/Obs factory drift sql.md, Iceberg.md, OssFile.md Low

5. Merge Recommendation

Conclusion: Ready to merge

CI: On head 2433602e the apache-side checks (Build, labeler, Notify test workflow) are green, and the fork Build run for this head also completed successfully. mergeStateStatus is BLOCKED only because a review approval is still required. The branch is 4 commits behind dev (compare status diverged, 3 ahead, no conflicts, mergeable=true); that is just metadata and does not need action.

Blockers (must fix): None. Both blockers from my previous review are resolved on this head (and the same two items from @SEZ9).

Recommended fixes (non-blocking): Issues 1 to 4. Issue 1 is the one I would most like to see tidied before merge since it is a small, self-inflicted inconsistency (restoring the three table rows is a one-line-each fix), but it does not make the docs wrong in a way that misleads users about a working feature. Issues 3 and 4 can go in the follow-up you already planned.

Existing reviews: @SEZ9's CHANGES_REQUESTED review was against 81961ee4; its two High items are fixed on this head, so I think that review is now ready to be re-checked and dismissed or approved by a maintainer with write access. I do not have write-level review controls, so I am posting this as a comment.

Overall assessment: About 90 percent of the changes are accurate, well-verified corrections and a clear improvement. Thanks again for the careful docs sweep and for fixing the items so fast. No better alternative approach is needed.

…eSink sinks and align en stain-trace quickstart on the canonical key
@zhangshenghang

Copy link
Copy Markdown
Member Author

Thanks @DanielLeens — both new actionable leftovers are addressed on head 66d2e86:

New Issue 1 (half-removed schema_evolution_enabled): took Option B — since CosFileSink/ObsFileSink/OssJindoFileSink extend BaseFileSink (no SupportSchemaEvolutionSink), I removed the leftover ### schema_evolution_enabled detail sections and the CDC examples with schema_evolution_enabled = true from all three sinks in en and zh (the docs no longer mention the option at all on those pages). The save-mode/evolution question for file sinks can be revisited in the same dedicated follow-up you suggested if support is ever implemented.

New Issue 2 (en quickstart alias): applied the same -interval → -rate replacement to the en quickstart (6 occurrences) — en and zh are consistent again.

Issues 3 and 4 remain the follow-up bucket as discussed (ObsFile STS rework, plugin_input sentence, Iceberg table_list snippet, and the optionRule code-side alignment). Ready for another look whenever you have a moment.

@DanielLeens DanielLeens left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry for missing this in the last round, @zhangshenghang, and thank you for the fast turnaround. I re-reviewed the latest head 66d2e868 from scratch, and I need to correct myself on one point: the advice I gave on schema_evolution_enabled for the Cos/Obs/OssJindo/Bos file sinks (my previous Issue 1, Option B, and my earlier Issue 3) was wrong. I followed it too quickly on the sink-level interface and did not trace the Zeta writer-level path to the end. You acted on my suggestion in good faith, so this one is on me. Details are in Issue 1 below. I also read @SEZ9's review and both of your replies.

What Problem Does This PR Solve?

Pain point: Several connector and engine docs drifted from the code (wrong option names and type mappings, missing sink options, stale EventType values, a renamed stain-trace key).

Fix approach: Docs-only edits to 15 en and 15 zh files (plus one more en/zh pair in the stain-trace quickstart); no code or config touched.

One-sentence summary: A mostly accurate docs correction PR, but the last two commits delete documentation of a feature that does work.

1. Code Change Review

1.1 Core Logic Analysis

No runtime change, so this is claim-by-claim verification against source at head 66d2e868.

Status of earlier items (all re-checked on this head):

  • LocalFile file_format_type is yes again in en and zh (closes my earlier Issue 1 and @SEZ9's Issue 2).
  • schema_save_mode / data_save_mode rows are gone from BosFile, CosFile, ObsFile and OssJindoFile. Those four sinks extend BaseFileSink, which has no SupportSaveMode, so that removal is correct (closes @SEZ9's Issue 1).
  • ClickHouse sink INT row keeps Int8 / UInt8 / Int16 / UInt16 / Int32; STAIN_TRACE is in the EventType table; the en stain-trace quickstart now uses stain-trace-sample-rate like the zh one. All good.
  • CDC cookbook (exactly_once, Postgres schema-name), ClickHouse source/sink type tables, OssFile source split/archive rows, EventType table and import paths, stain-trace key, and the OssFile/CosFile CDC example plugin names are all consistent with source.

Issue 1 below is the only thing that changed my mind about merge readiness. Runtime path:

CDC source (schema-changes.enabled=true) emits SchemaChangeEvent
  -> Zeta SinkFlowLifeCycle.processSchemaChangeEvent        [SinkFlowLifeCycle.java:887-893]
      writer instanceof SupportSchemaEvolutionSinkWriter ?  -> applySchemaChange(event)
  -> BaseFileSinkWriter implements SupportSchemaEvolutionSinkWriter, delegates to the write strategy
                                                            [BaseFileSinkWriter.java:56,190-192]
  -> AbstractWriteStrategy.applySchemaChange                [AbstractWriteStrategy.java:~236-300]
      gated on FileSinkConfig.isSchemaEvolutionEnabled()    <- reads schema_evolution_enabled
      flush/close open files, adopt event.changeAfter schema, rebuild column + partition indexes

SupportSchemaEvolutionSink.supports() (the sink-level interface I leaned on) is only consulted by MultiTableSink and the Flink starters. Zeta delivers the event straight to the writer, and BaseFileSinkWriter is the writer used by CosFileSink, ObsFileSink, BosFileSink and the Jindo OssFileSink. FileSinkConfig.java:226-232 (binary-format rejection) is also shared. FileSchemaEvolutionTest / ParquetWriteStrategyEvolutionTest exercise this write-strategy path. So on Zeta the option is read and acted on for these four sinks. Caveat: this is a source trace, I did not run a Cos/Obs job, and I did not find a connector-specific E2E for them.

1.2 Compatibility Impact

Fully compatible. Docs only; no config keys, defaults, serialization or checkpoint behavior change.

1.3 Performance / Side-Effect Analysis

None (docs only).

1.4 Error Handling and Logging

Issue 1: schema_evolution_enabled documentation was removed from working sinks (my mistake, please restore)

  • Location: docs/en/connectors/sink/CosFile.md, docs/en/connectors/sink/ObsFile.md, docs/en/connectors/sink/OssJindoFile.md and the zh counterparts. These are the table row, the ### schema_evolution_enabled [boolean] detail section and the CDC example in each page. The removed text exists on dev today.
  • Problem: The option is declared in FileBaseSinkOptions.java:340-347, read for every file sink in FileSinkConfig, and applied through the writer-level path shown above. Removing the row and section tells users the feature is unavailable on these sinks, and the runtime error raised by AbstractWriteStrategy.applySchemaChange when the option is false explicitly tells users to set schema_evolution_enabled=true, which would now point at an option the page no longer mentions.
  • Risk: Users running CDC with schema-changes.enabled = true into these sinks lose the only documentation of the switch that prevents an UnsupportedOperationException at the first ALTER event.
  • Best improvement: Restore the three table rows and the detail sections/examples exactly as on dev (en and zh). The enable_header_write rows you added next to them are fine to keep. Optionally add the same row/section to BosFile, since it shares the same writer. The pre-existing "Known limitation" sentence in those sections is already cut off mid-sentence on dev (... full restart-with-DDL correctness,); finishing or trimming it would be a nice touch but is not required here.
  • Severity: High (it deletes correct documentation for a working feature)
  • Raised by another reviewer: No. Partly related to @SEZ9's Issue 1, whose schema_evolution_enabled remark I am now respectfully walking back for the same reason.

Issue 2: ObsFile source STS section is still self-contradictory (carryover, non-blocking)

  • Location: docs/en/connectors/source/ObsFile.md:428-445 and zh.
  • Problem: The section is still titled "Reading with Temporary Security Credentials (OBS STS)", yet it says no session token can be passed, so "STS credentials must be issued without a session token binding". Huawei STS credentials always come with a security token, and ObsConf only maps access_key / access_secret / endpoint. This is the same point as @SEZ9's Issue 3 (+1).
  • Best improvement: State plainly that STS temporary credentials and ECS Agency are not supported by this connector today, drop the example, and keep only least-privilege/rotation guidance.
  • Severity: Medium (you already planned this for a follow-up, which is fine for me)
  • Raised by another reviewer: Yes (@SEZ9)

Issue 3: Small leftovers (non-blocking)

  • Location: docs/en/connectors/sink/Clickhouse.md BIGINT row, docs/en/transforms/sql.md, docs/en/connectors/source/Iceberg.md, docs/en/connectors/source/OssFile.md:240-242, docs/en/connectors/source/LocalFile.md:57
  • Problem: (a) +1 to @SEZ9's Issue 6: the ClickHouse sink table now mixes "what ClickhouseTypeConverter.reconvert emits" (TINYINT/SMALLINT/INT/TIMESTAMP/TIME) with "what the writer accepts" (BIGINT still lists UInt32/UInt64/Interval*); a one-line note above the table would remove the ambiguity. (b) plugin_input is typed list<string> but the page does not say a single string still works. (c) The Iceberg table_list text names splitSize etc. with no snippet. (d) +1 to @SEZ9's Issues 4 and 5: enable_file_split / file_split_size and several Bos/Obs sink rows are honored at runtime but not declared in the factories' optionRule(); that is a code follow-up, not this PR. (e) Nit: the LocalFile row now reads yes | with one extra space; it renders fine.
  • Severity: Low
  • Raised by another reviewer: Partly (@SEZ9)

2. Code Quality Assessment

2.1 Coding Standards

No code changes. Tables are consistently formatted.

2.2 Test Coverage and Test Stability

N/A for docs. Stability: Stable (nothing executable changed).

2.3 Documentation Updates

en and zh are in lockstep on every changed page.

3. Architectural Soundness

3.1 Elegance of the Solution

Precise fix for the verified claims; Issue 1 is a case where the docs were trimmed to match a sink-level interface rather than the real Zeta runtime path.

3.2 Maintainability

Good. Where a factory optionRule() is itself off (Issue 3d), a small code PR is the right place to fix it.

3.3 Extensibility

N/A.

3.4 Historical-Version Compatibility

No impact; no code, config or defaults changed.

4. Issue Summary

Number Issue Location Severity
1 schema_evolution_enabled row/section/example removed from Cos/Obs/OssJindo sink docs although the option works docs/{en,zh}/connectors/sink/{CosFile,ObsFile,OssJindoFile}.md High
2 ObsFile source STS section self-contradictory (carryover, also @SEZ9) docs/{en,zh}/connectors/source/ObsFile.md:428-445 Medium
3 ClickHouse BIGINT semantics note, plugin_input wording, Iceberg example, factory/doc drift, LocalFile spacing see above Low

5. Merge Recommendation

Conclusion: Ready to merge after fixes

CI: On head 66d2e868, Build, labeler and Notify test workflow are all green (docs-only change). mergeStateStatus is BLOCKED only because a review approval is still required. The branch is 7 commits behind dev (compare status diverged, mergeable=true, no conflicts); that is metadata only and needs no action.

Blockers (must fix):

  • Issue 1: restore the schema_evolution_enabled row, detail section and CDC example on CosFile, ObsFile and OssJindoFile (en and zh). This is a revert of the last two commits' deletions for that option only; everything else in them (stain-trace quickstart, the save-mode row removals) should stay.

Recommended fixes (non-blocking): Issues 2 and 3, which can go into the follow-up you already planned.

Existing reviews: @SEZ9's CHANGES_REQUESTED review targets 81961ee4; its two High items (LocalFile, save-mode rows) are fixed on this head. One of its remarks (BosFile/Cos/Obs schema_evolution_enabled has no effect) is the part I am now retracting in Issue 1, so I would suggest re-checking that review against this comment. I do not have write-level review controls, so I am posting this as a comment.

Overall assessment: About 90 percent of the PR is accurate, careful work and a clear improvement; once Issue 1 is reverted I do not see another blocker. Thanks again for the patience with my back-and-forth. No better alternative approach is needed.

@SEZ9

SEZ9 commented Oct 13, 2026

Copy link
Copy Markdown
Collaborator

Thanks @zhangshenghang — the summary for 2433602e matches what I raised, and I'll verify each point against the diff before resolving:

  • LocalFile file_format_type back to required (en/zh)
  • schema_save_mode / data_save_mode rows removed from BosFile, CosFile, ObsFile and OssJindoFile, plus the BosFile schema_evolution_enabled row
  • UInt8 / UInt16 and Int8 / Int16 restored in the Clickhouse sink INT row
  • STAIN_TRACE row added to the EventType table; no objection to the stain-trace-sample-rate key change as part of that

A few open questions:

  1. Clickhouse: did the BIGINT row (UInt32 / UInt64 / Interval*) change on this head too, or is it intentionally kept as a write-compatibility list? If the latter, a short note or a split between DDL-generation and write-compatibility mappings would make the two semantics explicit. The source table also still omits Bool/UUID/IPv4/IPv6.
  2. Your comment appears cut off at "will take these in a f" — I assume "follow-up". Deferring the ObsFile STS section rewrite is fine with me; please confirm and drop a link once it exists.
  3. Two earlier points I didn't see mentioned — handled or also deferred?
    • OssFile source: enable_file_split / file_split_size documented but not declared in OssFileSourceFactory.optionRule().
    • ObsFile/BosFile sink: newly documented rows (tmp_path, encoding, csv_string_quote_mode, enable_header_write, excel/CDC options) not in the respective *FileSinkFactory.optionRule().

Happy to take another pass once those are clarified.

@DanielLeens

Copy link
Copy Markdown
Contributor

Hi @zhangshenghang — I rechecked the current head 66d2e8680d796532406bdeaa6b511a66004dc20b. Apache Build is green, but my source-traced blocker from the latest review remains unaddressed: schema_evolution_enabled works through the Zeta writer path for CosFile, ObsFile and OssJindoFile, while this head removes its option row, detail section and CDC example in both languages.

Please restore those three documentation sections/examples (the save-mode removals should remain). Once that is pushed, tag me and I will re-review promptly. The STS and small clarity items can stay in the planned follow-up.

# Conflicts:
#	docs/en/engines/zeta/stain-trace.md
#	docs/zh/engines/zeta/stain-trace.md

@DanielLeens DanielLeens left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you @zhangshenghang for the quick turnarounds on the earlier rounds, and for keeping the branch in sync with dev. The head is now 468a03f25357faa2ff83dd897614793a62d26bad, a merge of dev on top of 66d2e868; there is no author-side content change since my last review, so the blocker I raised there is still open. I re-read the complete 29-file diff at this head, not just the merge, and re-checked every claim I could against dev source. This is a static review; nothing was built or run.

What Problem Does This PR Solve?

  • User pain point: connector and engine docs drifted from the code: wrong ClickHouse type rows, non-existent option keys in the CDC cookbook (exactly-once, Postgres schema-names), a fictional OBS option, stale EventType values, a renamed stain-trace key, and plugin_input typed as a string.
  • Fix approach: docs-only edits to 15 en and 15 zh pages, each backed by a source reference.
  • One-sentence summary: a mostly accurate correction pass that still deletes the documentation of a working feature (schema_evolution_enabled on Cos/Obs/OssJindo file sinks) and now carries a duplicated option row after the dev merge.

1. Code Change Review

1.1 Core Logic Analysis

Docs only, so verification is claim-by-claim against dev. Items that hold up at this head: LocalFile file_format_type is required again in en and zh; the schema_save_mode / data_save_mode rows are gone from the four BaseFileSink-based sinks (correct, they have no SupportSaveMode); the ClickHouse INT rows, the STAIN_TRACE EventType row, the stain-trace-sample-rate key, the CDC cookbook keys and the OssFile/CosFile CDC example plugin names all match source.

The one claim I need to re-confirm against the current source is the removal of schema_evolution_enabled from the CosFile, ObsFile and OssJindoFile sink pages. Runtime path on dev (re-read for this review):

CDC source (schema-changes.enabled = true) emits SchemaChangeEvent
  -> SinkFlowLifeCycle.processSchemaChangeEvent                 SinkFlowLifeCycle.java:886-893
       writer instanceof SupportSchemaEvolutionSinkWriter -> applySchemaChange(event)
  -> BaseFileSinkWriter implements SupportSchemaEvolutionSinkWriter   BaseFileSinkWriter.java:56, 190-192
       -> writeStrategy.applySchemaChange(event)
  -> AbstractWriteStrategy.applySchemaChange                     AbstractWriteStrategy.java:239-244
       if !fileSinkConfig.isSchemaEvolutionEnabled() -> error telling the user to
       "set schema_evolution_enabled=true"
CosFileSink / ObsFileSink / OssJindoFile OssFileSink extend BaseFileSink -> createWriter() returns BaseFileSinkWriter   BaseFileSink.java:91, 103

So the sink-level interface (SupportSchemaEvolutionSink, which BaseFileSink does not implement) is not what Zeta consults; the writer-level path above is, and the option is read and acted on for these sinks. The head still has zero occurrences of schema_evolution_enabled in CosFile.md, ObsFile.md and OssJindoFile.md (en and zh), while dev has five in each page (table row, detail section, error-message quote, and the CDC example). The runtime error text quoted above points users at an option the page no longer mentions.

1.2 Compatibility Impact

Fully compatible. Docs only; no config keys, defaults, serialization or checkpoint behavior change.

1.3 Performance / Side-Effect Analysis

None.

1.4 Error Handling and Logging

  1. High (required): schema_evolution_enabled documentation is still removed from working sinks.
    • Location: docs/{en,zh}/connectors/sink/CosFile.md, ObsFile.md, OssJindoFile.md (table row, ### schema_evolution_enabled [boolean] section, and the CDC example).
    • Problem: the source trace above shows the option works through the Zeta writer path for these three sinks. Removing it tells CDC users with schema-changes.enabled = true that the feature is unavailable, and the first ALTER event then fails with a message that references the now-undocumented option. This was my own wrong suggestion in an earlier round, and I flagged it on the PR thread; it is not yet fixed on this head.
    • Risk: users lose the only documentation of the switch that prevents the failure at the first ALTER event.
    • Best improvement: restore those row, section and example blocks exactly as they are on dev for the three sinks (en and zh). The save_mode removals should stay. Keep BosFile as it is (no row on dev).
    • Raised by another reviewer: no; related to @SEZ9's first finding, whose schema_evolution_enabled remark I am walking back for the same reason.
  2. Medium (required, new with the merge): duplicated archive_compress_codec row in the OssFile source pages.
    • Location: docs/en/connectors/source/OssFile.md:213 and :241, docs/zh/connectors/source/OssFile.md:213 and :241.
    • Problem: dev already documents archive_compress_codec at line 213 (it was added after this PR was opened); this PR still adds its own row at line 241, so the option table now lists it twice with slightly different wording. enable_file_split and file_split_size at lines 242-243 are fine and appear once.
    • Risk: a duplicated, inconsistently worded row in the main option table.
    • Best improvement: delete the PR's added archive_compress_codec row (line 241) in both languages and keep the dev row.
    • Raised by another reviewer: no.
  3. Medium (carryover, author already deferred): the OBS STS section is self-contradictory.
    • Location: docs/en/connectors/source/ObsFile.md:428-445, docs/zh/connectors/source/ObsFile.md:170-187.
    • Problem: the section is titled "Reading with Temporary Security Credentials (OBS STS)" but says no session token can be passed ("STS credentials must be issued without a session token binding"). STS output always comes with a security token, and ObsConf only maps access_key, access_secret and endpoint.
    • Best improvement: say plainly that STS temporary credentials and ECS Agency are not supported by this connector today, drop the example, and keep only least-privilege and rotation guidance. A follow-up PR is acceptable to me if you link it here.
    • Raised by another reviewer: yes (@SEZ9, +1).
  4. Low (carryover): small leftovers. (a) The ClickHouse sink table mixes what ClickhouseTypeConverter.reconvert emits with what the writer accepts (BIGINT still lists UInt32/UInt64/Interval*); a one-line note would remove the ambiguity (+1 to @SEZ9). (b) The plugin_input row is typed list<string> without saying a single string still works. (c) The Iceberg table_list text names splitSize and friends without a snippet. (d) enable_file_split / file_split_size and several Bos/Obs sink rows are honored at runtime but not declared in the factories' optionRule(); that is a code follow-up, not this PR (+1 to @SEZ9). Raised by another reviewer: partly.

2. Code Quality Assessment

2.1 Coding Standards

No code changes; tables are consistently formatted in en and zh.

2.2 Test Coverage and Test Stability

No tests changed, so a stability rating does not apply. CI for this exact head: fork Build 40209543106 completed successfully and the Apache-side Build check is green. This is current-head evidence only.

2.3 Documentation Updates

en and zh are in lockstep on every changed page; Issues 1 to 3 need matching fixes in both languages. I did not run a docs site build.

3. Architectural Soundness

  • 3.1 Elegance: precise fixes backed by source references; Issue 1 is a case where the docs were trimmed to match a sink-level interface instead of the real Zeta runtime path.
  • 3.2 Maintainability: good; where a factory optionRule() itself is off (Issue 4d), a small code PR is the right place.
  • 3.3 Extensibility: not applicable.
  • 3.4 Historical-Version Compatibility: no code, config or default change.

4. Issue Summary

Number Issue Location Severity
1 schema_evolution_enabled docs removed from Cos/Obs/OssJindo sinks although the option works docs/{en,zh}/connectors/sink/{CosFile,ObsFile,OssJindoFile}.md High
2 duplicated archive_compress_codec row after the dev merge docs/{en,zh}/connectors/source/OssFile.md:213,241 Medium
3 OBS STS section self-contradictory (carryover, also @SEZ9) docs/{en,zh}/connectors/source/ObsFile.md Medium
4 ClickHouse BIGINT note, plugin_input wording, Iceberg example, factory/doc drift various Low

5. Merge Recommendation

CI is green on this head. The branch is 5 ahead and 1 behind dev with no conflicts; since CI is green, no sync is needed for that reason alone.

Conclusion: Ready to merge after fixes

  1. Blockers (must fix): Issue 1 (restore the three schema_evolution_enabled blocks) and Issue 2 (remove the duplicated row). Both are small docs edits.
  2. Recommended fixes (non-blocking): Issue 3 can go in the follow-up you planned, with a link here; Issue 4 items are optional.

Overall assessment: the correctness gains in this PR are real (ClickHouse types, CDC cookbook keys, EventType, stain-trace key). Once the two blockers are fixed it is ready for a write-capable committer. My earlier review comments are technical assessments, not an effective write-level approval.

Better alternative: none; if you prefer, split the ObsFile STS rewrite into its own PR so this one can merge sooner.

Jelana and others added 2 commits November 1, 2026 15:58
Resolve conflict in docs/en/connectors/source/LocalFile.md: keep the
dev-side 'conditionally yes' requirement for file_format_type, which
matches the schema/tables_configs conditional described in the option
detail section.
…ive_compress_codec row

Restore the schema_evolution_enabled option table row, detail section and
CDC example in the CosFile, ObsFile and OssJindoFile sink docs (en/zh)
exactly as they exist on dev: the option is honored through the Zeta
BaseFileSinkWriter path, so removing its documentation left CDC users
without the switch that prevents the first ALTER event from failing.

Remove the duplicated archive_compress_codec row that this PR added next
to the existing dev row in the OssFile source docs (en/zh); keep the dev
row and the enable_file_split / file_split_size additions.

Co-authored-by: multica-agent <github@multica.ai>

@DanielLeens DanielLeens left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for restoring the schema-evolution documentation and removing the duplicated archive option, @zhangshenghang. I re-read the entire 28-file diff at 3b7824f195 and traced the documented behavior against this head's source. My previous blocking Issues 1 and 2 are resolved. Current-head Build is green, so I am recording approval of the technical change, with the previously agreed follow-ups below. Daniel's READ-level review is separate from the write-capable maintainer approval required by the repository.

What Problem Does This PR Solve?

  • User pain: Connector examples, type tables and engine event/configuration names had drifted from the runtime implementation, making valid jobs harder to configure and example event handlers fail to compile.
  • Fix approach: Correct matching English/Chinese connector, event-listener, SQL and stain-trace pages; document shared file options; retain working schema-evolution instructions.
  • One-sentence summary and example: Use the options and event types the code actually recognizes: the CDC example now specifies exactly_once, and an event handler switches on LIFECYCLE_READER_OPEN rather than a nonexistent READER_OPEN enum value.

1. Code Change Review

1.1 Core Logic Analysis

Only documentation changes. I inspected every changed hunk in the 28 pages, then checked the options/types/dispatch branches rather than treating factory metadata alone as proof of runtime support.

Representative before/after:

# before
exactly-once = true
# after
exactly_once = true
// before documented imports / switch
org.apache.seatunnel.api.event.source.ReaderOpenEvent
case READER_OPEN:
// after
org.apache.seatunnel.api.source.event.ReaderOpenEvent
case LIFECYCLE_READER_OPEN:
# before documented compatibility alias
stain-trace-sample-interval: 100
# after canonical key
stain-trace-sample-rate: 100

Affected runtime paths checked:

CDC job config -> SourceOptions.EXACTLY_ONCE [113-119]
 -> connector source configuration -> snapshot/stream behavior

File factory -> BaseFileSink / BaseMultipleTableFileSink -> FileSinkConfig
 -> selected writer/format -> shared header, quote, encoding, Excel/CDC settings
 -> schema event: SinkFlowLifeCycle checks writer capability [888]
    -> BaseFileSinkWriter implements SupportSchemaEvolutionSinkWriter [53-56]
    -> applySchemaChange [190-191] -> AbstractWriteStrategy [239-245]
    -> schema_evolution_enabled gate (restore events are treated separately)
Save-mode handler is a distinct sink-level capability, not implied by writer evolution support.

OssFile source config -> FileSplitStrategyFactory [37-78]
 -> enable flag -> supported format + compression checks -> split-size validation
 -> text/JSON/CSV or Parquet splitting

OBS source factory -> ObsConf.buildWithReadonlyConfig
 -> explicit ACCESS_KEY / SECRET_KEY / ENDPOINT map -> Hadoop OBS client
 -> no session-token mapping through these documented three options

ClickHouse source -> driver column object class -> TypeConvertUtil.convert [69-105]
 -> signed-width/temporal/decimal/etc SeaTunnel types
ClickHouse sink auto-create -> ClickhouseTypeConverter.reconvert [62-121]
 -> Int8/Int16/Int32/Int64, Bool, String for TIME, DateTime64 for TIMESTAMP
Existing-column writer compatibility is a broader, distinct mapping.

Iceberg table_list -> SourceTableConfig typed split fields
 -> IcebergScanContext [84-86] -> scan split planner -> per-table scan options
SQL transform constructor [90-95] -> first configured input identifier, or catalog table name
 -> SQL engine.init [104-110] -> actual query processing

Engine YAML parser [255-263] -> canonical sample-rate key or retained interval alias
 -> EngineConfig -> trace sampling
Event dispatch -> EventType + concrete lifecycle/schema/stain event classes
 -> registered handler -> switch/cast using actual packages and enum constants

Key findings:

  1. Normal users hit the corrected configuration/example paths. The edits do not implement new runtime features or change the alias's compatibility behavior.
  2. The previous schema-evolution removal is reversed: CosFile, ObsFile and OssJindo retain their row, detail section and CDC usage. The writer-level Zeta path supports the option even though the sink-level interface differs. My earlier contrary advice is withdrawn.
  3. Save-mode removals remain correct for BaseFileSink-based sinks; schema-evolution support does not imply save-mode support. LocalFile's required format instruction is no longer weakened by this diff.
  4. OssFile source has one archive_compress_codec row in each language; the additional split rows are distinct options. Previous Issue 2 is closed.
  5. The retained OBS temporary-credential section is still inaccurate, as already discussed and accepted for a separate follow-up. It is not evidence of newly added STS support. See the attributed shared follow-up below.

1.2 Compatibility Impact

Fully compatible at runtime. No public API, configuration name/default, protocol, serialization or historical execution behavior changes. Canonical stain-trace documentation replaces an alias, while the parser still accepts both. Schema-evolution instructions are preserved rather than restricting a working path. No incompatible-change entry is required for this docs-only correction.

1.3 Performance and Side Effects

The PR adds no CPU, memory, GC, network, lock, concurrent task, retry, idempotency or resource-release behavior. Users enabling documented splitting/header/CDC options exercise existing code, including its format/compression checks. No runtime performance claim is inferred from the documentation change.

1.4 Error Handling, Logging and Formal Findings

No exception/logging implementation changes. Correct names reduce configuration and example-compilation mistakes. There is no new source blocker. Remaining findings are the previously agreed follow-up scope, not new requests on this version.

Shared follow-up: @SEZ9's Issue 3, OBS STS example (Daniel's previous Issue 3)

  • Location: docs/en/connectors/source/ObsFile.md:428-445; docs/zh/connectors/source/ObsFile.md:170-187.
  • Description: +1 to @SEZ9's existing finding. ObsConf only installs AK/SK/endpoint; the section's instruction to issue STS keys without a security token is not a usable temporary-credential flow. Huawei's credential documentation states that temporary keys need the security token. Also, the existing link labeled OBS STS currently resolves to an object POST-upload API page, so it is not the intended credential reference.
  • Potential risk: An operator following that temporary-key example cannot authenticate through the documented three-option path.
  • Best improvement: In the agreed follow-up, remove unsupported tokenless-STS/Agency guidance from this configuration example, explain the supported credential path and least-privilege/rotation practice, and link the proper credential reference. Do not add an unrelated connector implementation to this docs correction.
  • Severity: Medium; retained as non-blocking under the follow-up scope already agreed in this discussion. Please link that follow-up when opened.
  • Already raised by another reviewer: Yes, @SEZ9 review 5487029269; attributed here rather than assigned another Daniel issue number.

Issue 4: Small configuration examples/wording can be clearer (existing optional note)

  • Location: docs/en/transforms/sql.md:22 and docs/en/connectors/source/Iceberg.md:87, with corresponding zh pages.
  • Description: The SQL row now describes list<string> but does not explicitly retain the supported single-string form; the Iceberg row names camel-case per-table split fields without a concrete table_list item.
  • Potential risk: Readers may unnecessarily rewrite a valid single-input job or miss where to place per-table tuning.
  • Best improvement: A short single-string compatibility sentence and one table_list snippet in the already planned documentation follow-up.
  • Severity: Low; non-blocking.
  • Already raised by another reviewer: No for these two retained Daniel clarity notes. Other parts of the earlier bundled note are attributed separately below.

Other community follow-ups, deduplicated: +1 to @SEZ9's existing split/factory-metadata distinction (Issues 4/5): the shared config consumes these options, but some connector factory option rules omit them from discovery. That is a scoped code follow-up; it does not make the runtime option nonexistent. +1 to the ClickHouse DDL-versus-write-compatibility clarification (Issues 6/7, one overlapping topic), plus the source Bool/UUID/IP mapping omissions. The sink reconverter emits Int64 for BIGINT, while the table lists broader target compatibility. I would keep the agreed short clarification follow-up rather than reopen the now-corrected blocking requests. The STAIN_TRACE row requested in Issue 8 is present.

2. Code Quality Assessment

2.1 Coding Standards

Matching en/zh edits, code fences and table structure are consistent. There are no new production methods or fields needing code contracts. The ClickHouse sample port correction to 8123 matches the HTTP client convention rather than the old Kafka port example.

2.2 Test Coverage and Stability

No UT/E2E test code changes, so a test-stability rating is not applicable. Runtime branches and example symbol names were inspected statically. I did not compile example handlers or run the website locally.

Exact-head fork Build 41287509567 concluded success: seven jobs succeeded and 50 were skipped under the docs-only matrix. Apache Build and PR signal are SUCCESS. This is successful docs-only CI, not execution of all connector/engine integration tests.

2.3 Documentation

All 28 changed pages were inspected, including English/Chinese option/default/sample parity. Corrected schema-evolution instructions remain in both languages, and the duplicate archive row is removed in both. Retained follow-ups are listed explicitly rather than represented as complete corrections.

3. Architectural Assessment

3.1 Solution Quality

Focused documentation repair. Runtime capability checks are a better basis than copying sibling tables or relying on a sink-level marker alone.

3.2 Maintainability

Source-backed option names and event packages reduce future drift. Linking focused follow-ups for metadata registration and credential examples will keep this correction's scope manageable.

3.3 Extensibility

No new abstraction is added. Shared file options should be documented consistently with runtime consumption and factory metadata, as separate aspects.

3.4 Historical Compatibility

Valid jobs and aliases remain valid. This PR describes current behavior; it does not change checkpoint/serialization or authorize unsupported credential modes.

4. Issue Summary

Number/reference Issue Location Severity
SEZ9-3 (previous Daniel 3) Unsupported tokenless OBS STS example source/ObsFile.md:428-445 (en); zh counterpart Medium, agreed non-blocking follow-up
4 SQL single-string wording / Iceberg per-table snippet transforms/sql.md:22; source/Iceberg.md:87 Low

Previous blocking Issues 1 and 2 are resolved. Other shared non-blocking metadata/ClickHouse notes are attributed above and are not renumbered as duplicate Daniel findings.

5. Merge Conclusion

Conclusion: Can merge

  1. Blockers (must fix): None remaining from Daniel's technical review. The repository still needs effective write-capable maintainer approval/merge-gate handling.
  2. Recommended improvements (non-blocking): Complete the agreed OBS credential, option-metadata and ClickHouse clarification follow-ups; retain Issue 4's small SQL/Iceberg documentation improvements there. They do not reopen the two source-traced blockers now fixed.

Overall assessment: The current diff fixes the blocking documentation regressions, and current-head docs CI is green. This approval supersedes Daniel's old blocking conclusion. @SEZ9's historical CHANGES_REQUESTED was based on the old save-mode/LocalFile regressions; those changes are fixed, while the schema-evolution part required the writer-path correction explained above. A write-capable maintainer should reconcile effective review requests independently; Daniel cannot dismiss another review or supply a write-reviewer gate.

Alternatives: Merge this focused correction and track the already agreed follow-ups (preferred). Folding their small docs edits into this PR is also reasonable, but a runtime migration of unrelated file connectors would be disproportionate.

Upstream facts: Current comparison is diverged, ahead seven / behind one, without a merge conflict. With direct current-head green CI there is no basis for a drift-only sync comment. This is recorded as metadata, not waiting for the contributor to synchronize.

Verification scope: Local Git fetch/isolated branch, complete diff and actual runtime caller reads; 28 files, +135/-75; git diff --check returned 0. Huawei's official credential/API pages were checked to resolve the existing STS claim. No local build, test, website execution or actual cloud access was performed.

Snapshot 2026-11-01T12:44:32.037542+00:00: head 3b7824f19560b81c0f746e50d1526e152623c997, base dev; compare diverged, ahead 7 / behind 1; merge blocked / BLOCKED, review decision REVIEW_REQUIRED. Drift is recorded separately; it does not itself request synchronization.

Resolve Iceberg.md (EN/ZH) conflicts: keep the dev-side table_list row
with the camelCase item-key note and the Multi-Table Read anchor.

@DanielLeens DanielLeens left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks again for the steady work on this docs sweep, @zhangshenghang. Since my approval at 3b7824f1 the only new commits are two merges of dev (18cc300b, 976090cf); the PR's own content is unchanged. I re-read the full 26-file diff at 976090cf and re-checked the claims against the sources at this head.

What Problem Does This PR Solve?

  • User pain: Connector examples, type tables and engine event/stain-trace names had drifted from the code, so valid jobs were harder to configure and the event-listener example would not compile.
  • Fix approach: Matching English and Chinese corrections for ClickHouse type tables, file sink shared options, ObsFile and OssFile sources, CDC cookbook keys, EventType and stain-trace names, and the SQL plugin_input type.
  • Summary: Docs now use options and enum names the code actually recognizes, for example LIFECYCLE_READER_OPEN instead of a nonexistent READER_OPEN.

1. Code Change Review

1.1 Core Logic Analysis

Docs only; no executable change. Spot checks at 976090cf:

  • EventType has exactly the constants now in docs/*/engines/event-listener.md, including STAIN_TRACE and JOB_STATUS, and no READER_OPEN, WRITER_OPEN or WRITER_CLOSE variants without the LIFECYCLE_ prefix.
  • ClickhouseTypeConverter.reconvert maps TINYINT, SMALLINT, INT, BIGINT, BOOLEAN, TIMESTAMP (DateTime64) and TIME (String), matching the sink table.
  • ObsConf puts only access key, secret key and endpoint into the Hadoop config, so removing hadoop_obs_properties is right.
  • ObsFileSinkFactory declares FILENAME_EXTENSION and the shared sink options added to the ObsFile sink table.
  • OssFile source rows for enable_file_split / file_split_size and the single archive_compress_codec row are present; LocalFile file_format_type stays "conditionally yes"; CosFile keeps its schema_evolution_enabled section; BosFile/CosFile/ObsFile/OssJindoFile carry no schema_save_mode / data_save_mode rows.
  • No conflict markers remain from the merges.

1.2 Compatibility Impact

None. No config keys, defaults, serialization or checkpoint behavior change. The stain-trace alias stain-trace-sample-interval still works; the docs now simply show the canonical key.

1.3 Side Effects

None.

1.4 Error Handling and Logging

No blocking issue. One carried-over, non-blocking item that I already accepted as a follow-up at the previous head:

Issue 1

  • Location: docs/en/connectors/source/ObsFile.md:430-445, docs/zh/connectors/source/ObsFile.md (same section)
  • Problem: The "OBS STS" section now says STS credentials "must be issued without a session token binding" and later still says "prefer STS-issued temporary credentials". Huawei STS credentials always carry a security token, and ObsConf cannot pass one, so the section is self-contradictory.
  • Risk: Users may follow the section and fail authentication.
  • Best improvement: In a small follow-up, state that STS temporary credentials are not supported by this connector today, or drop the section until token support exists.
  • Severity: Low (non-blocking, follow-up)
  • Raised by another reviewer: Previously discussed in this PR; not a new finding.

2. Code Quality Assessment

2.1 Coding Standards

Markdown tables are consistent; no code touched.

2.2 Test Coverage and Test Stability

N/A for docs. Stability: Stable (nothing executable changed).

2.3 Documentation Updates

English and Chinese pages are updated in lockstep for all 13 file pairs.

3. Architectural Soundness

Precise, source-backed corrections. Changes dropped from the diff since the earlier head (Hive, Iceberg, LocalFile, MongoDB, Datahub and others) were already landed on dev, so nothing was lost; I confirmed the LocalFile and Iceberg table_list content remains correct at this head.

4. Issue Summary

Number Issue Location Severity
1 ObsFile STS section still self-contradictory (follow-up) docs/{en,zh}/connectors/source/ObsFile.md Low, non-blocking

5. Merge Recommendation

Conclusion: Ready to merge

CI: Apache-side Build is green on 976090cf; the branch is 0 commits behind dev. mergeStateStatus is BLOCKED only because a write-capable maintainer approval is still required. My review is READ-level and does not replace that.

Blockers: None.

Non-blocking: Issue 1 as a separate follow-up.

@davidzollo davidzollo left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed the complete documentation diff and the affected source on head 976090cf0fd66883997fa5b47f49729b94448095.

Merge conclusion: hold for one documentation correction.

[P2, blocking] Do not recommend tokenless OBS STS credentials. docs/en/connectors/source/ObsFile.md:430-445 and the matching Chinese section recommend temporary AK/SK through the standard options and say that STS credentials must be issued without a session token binding. That is not a usable authentication flow: Huawei's OBS temporary-credential documentation requires both the temporary AK/SK and the security token. ObsConf.buildWithReadonlyConfig (connector-file-obs/.../config/ObsConf.java:45-51) only installs AK, SK and endpoint, so this example cannot transmit that required token. A user following this newly rewritten example cannot authenticate with STS.

The smallest safe fix belongs in this documentation PR: remove the tokenless workaround and state that this connector configuration cannot currently carry OBS STS credentials. Actual token/provider support belongs in a separately tested connector change; it need not be implemented here. Please correct both languages before merging.

I also checked the ClickHouse mappings, shared file options, restored schema-evolution sections, event constants/imports, sampling option and SQL input description. No other blocking finding identified. This is docs only: new UT/IT are not required, and the current-head documentation CI passed. Local compilation/tests were not run.

Review time: 2026-11-07T15:41:40-05:00

@DanielLeens DanielLeens left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Re-checked the new head 53d8a5e2: the only change since my last review (976090cf) is a merge of the latest dev; the PR's own docs changes are unchanged (the few differing lines I saw between the two heads are text that landed on dev in the meantime, for example the null_format rows in ObsFile and OssFile).

Previous blockers: None from my side at the last review. However, I need to correct my earlier judgement on one point. I had accepted the ObsFile "OBS STS" section (docs/*/connectors/source/ObsFile.md, the paragraph around line 445) as a non-blocking follow-up. davidzollo has since reviewed 976090cf and holds the PR on exactly that section, and I agree with him after re-checking the source: ObsConf.buildWithReadonlyConfig installs only access key, secret key and endpoint, while Huawei OBS temporary credentials always need a security token as well. The text tells users to use STS credentials "issued without a session token binding", which cannot work, and then recommends STS again. This is user-facing misleading guidance, so it should be fixed in this PR rather than later.

Minimum fix (both en and zh): drop the tokenless STS workaround and state that this connector cannot currently carry OBS STS credentials (token/provider support would be a separate, tested connector change).

CI on the new head: the Apache Build check is action_required: no Build run exists in your fork for 53d8a5e2. Please enable or start the Build workflow in your fork's Actions tab (or push an empty "Trigger CI" commit) so the current head gets a real result. The branch is 2 commits behind dev; that alone does not need a sync.

Conclusion: Ready to merge after fixes

Blockers:

  1. ObsFile STS section (en and zh) recommends a flow that cannot authenticate (also raised by davidzollo).
  2. A passing Build on the current head.

@zhangshenghang

Copy link
Copy Markdown
Member Author

Agreed — the tokenless STS workaround was misleading. Fixed in 7c018b6 (both languages): the OBS STS section now states that this connector cannot currently use OBS STS temporary credentials, because ObsConf.buildWithReadonlyConfig installs only access_key, access_secret, and endpoint and there is no pass-through for the session token that OBS STS credentials always carry, so token-bound temporary credentials fail at connection time. It also notes that carrying a security token or a credential provider would require a separate, tested connector change, and recommends a long-lived AK/SK with a least-privilege policy scoped to the target bucket prefix instead. The STS example block was removed with it.

An empty "Trigger CI" commit (f6b48a4) was pushed on top so the fork's Build workflow runs on the new head.

@DanielLeens DanielLeens left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the quick fix, @zhangshenghang! Re-checked the new head f6b48a42.

What changed since my last review (53d8a5e2): only 7c018b61 (ObsFile docs, en + zh) plus the empty f6b48a42 "Trigger CI" commit. No other file in the PR changed.

Previous blocker (ObsFile OBS STS section, also raised by davidzollo): fixed.

  • docs/en/connectors/source/ObsFile.md:428-430 and docs/zh/connectors/source/ObsFile.md:170-172 no longer recommend tokenless STS credentials and drop the STS example. They now state the connector cannot use OBS STS credentials because no session token is passed through.
  • This matches the source: ObsConf.buildWithReadonlyConfig (connector-file-obs/.../config/ObsConf.java:45-53) only sets access key, secret key and endpoint.
  • The misplaced "provider jar on the classpath" sentence is gone too.
  • en and zh say the same thing. I found no in-repo links to the renamed heading.

CI on the new head: still not run. The Apache Build check is action_required ("Workflow run detection failed", https://github.com/apache/seatunnel/runs/128951702056). Your fork has no Build run for f6b48a42, even with the empty commit: the fork's latest Build runs are from Nov 6. Actions is enabled on the fork, so this looks like a lost trigger. Please start it by hand: open https://github.com/zhangshenghang/seatunnel/actions/workflows/build_main.yml, click Run workflow and pick docs-fix-batch-20261011. The Apache check should pick up the run within about 15 minutes. The branch is 2 commits behind dev, so no sync is needed.

Conclusion: Ready to merge after fixes

Blockers:

  1. A passing Build on the current head. This is the only remaining blocker, and I will approve once it is green.

No non-CI blockers remain.

@DanielLeens DanielLeens left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for starting the build, @zhangshenghang! Re-checked head f6b48a42.

CI was previously the only remaining blocker; CI is now passing, so I am changing my conclusion to approve. The Build run you started from docs-fix-batch-20261011 finished green on this exact head: https://github.com/zhangshenghang/seatunnel/actions/runs/42844454409 (Code style, License header, Sanity check results, Build website and Helm chart all passed; the rest are path-skipped for a docs-only change). The PR diff has not changed since my last review, and no non-CI blockers were open.

Conclusion: Approve

@DanielLeens DanielLeens left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the updated Apache SeaTunnel documentation head. I reviewed all 26 current files again. Sorry for missing the distinction between a SQL table alias and selecting one physical input in the earlier review; the wording issue below is a carryover, not a new runtime regression.

What Problem Does This PR Solve?

User pain point: examples use unrecognized configuration/event names, omit file options and advertise an OBS temporary-credential path the connector does not implement.

Fix approach: correct the keys/imports/type mappings, add option rows and replace the unsupported STS recipe with the actual limitation.

One-sentence summary: the guides describe the implementation users will run. For example, an event-handler example now imports ReaderOpenEvent from its real package and switches on LIFECYCLE_READER_OPEN.

1. Code Change Review

1.1 Core Logic Analysis

Documentation changes follow existing event/configuration, file and ClickHouse contracts.

Before: exactly-once / stain-trace-sample-interval / READER_OPEN
After:  exactly_once / stain-trace-sample-rate / LIFECYCLE_READER_OPEN
Before: OBS hadoop_obs_properties session-token example
After:  explicit absence of a connector token/pass-through option
Before: SQL plugin_input declared string
After:  list<string>, but description incorrectly says only its first table is read
Job config -> MySQL CDC option parsing -> exactly_once behavior
seatunnel.yaml -> ServerConfigOptions stain-trace-sample-rate -> trace sampling
Lifecycle/schema event -> EventType -> registered handler switch
File factory -> shared FileBase options -> format writer/split strategy
ObsConf.buildWithReadonlyConfig:46 -> access/secret/endpoint only -> Hadoop OBS
SQLTransformFactory:61 -> SQLMultiCatalogFlatMapTransform per input CatalogTable
 -> SQLTransform:90 uses first plugin_input identifier as SQL alias
 -> AbstractMultiCatalogFlatMapTransform:47 routes every incoming table ID

Key findings:

  • Corrected event classes and enum names exist, including restore/stain trace.
  • OBS config installs only the three documented keys; removing the unsupported job-config STS recipe is justified.
  • ClickHouse sink injection supports the listed integer target families, distinct from the narrower automatic table-creation type mapping.
  • SQL's first list entry names the query relation; it does not mean other connected physical tables are discarded.

File option defaults align with shared definitions, including 128 MiB splitting and disabled header writes. Source paths, schema evolution examples and bilingual changes were inspected. No other reviewer findings were present.

Review baseline: current head df344ee36fc9c1c512d292194e053008b7f4819d against its merge base with dev. The complete local diff was reconciled with GitHub's file list; git diff --check passed. No local build, tests or PR execution were performed.

1.2 Compatibility Impact

Fully compatible. Runtime APIs/options/defaults/protocols and checkpoint formats are unchanged. These corrections do not add OBS STS support or change SQL multi-table behavior.

1.3 Performance / Side-Effect Analysis

No runtime allocation/network/lock/retry/resource change. Correct option names prevent silently ineffective configuration. OBS credentials remain a deployment concern; this docs PR does not implement credential refresh or a provider integration.

1.4 Error Handling and Logging

Issue 1: Explain the first SQL input identifier as an alias, not a table filter

  • Location: docs/en/transforms/sql.md:22 and docs/zh/transforms/sql.md:22.
  • Problem description: the added sentence says SQL reads the first table in plugin_input. SQLTransform takes the first identifier as inputTableName for SQL engine initialization, but SQLMultiCatalogFlatMapTransform builds transforms for the supplied CatalogTables and AbstractMultiCatalogFlatMapTransform routes rows by table ID. Other physical inputs are not simply ignored.
  • Potential risk: users infer unsupported filtering or lose confidence that all connected tables are processed; they may configure the wrong SQL/routing plan.
  • Best improvement: distinguish the list of upstream plugin identifiers from the SQL alias taken from its first entry, and state that transforms are applied per catalog table. Do not imply a join or first-table-only read.
  • Severity: Medium, blocking documentation correctness.
  • Raised by another reviewer: No; omitted in my earlier review.

No production error handling or logging changes. The OBS limitation removes an operationally misleading recipe rather than masking a connector error.

2. Code Quality Assessment

2.1 Coding Standards

Naming/import corrections are accurate. No new Java methods or fields are introduced. Preserve existing license conventions for modified docs.

2.2 Test Coverage and Test Stability

No UT/E2E code changes; stability rating is not applicable. Exact-head fork Builds 43056082233 and 43056081270 are green. Source and diff analysis do not establish live OBS/ClickHouse acceptance, and no local build/test/job was executed.

2.3 Documentation Updates

EN/ZH changes are paired, including the same SQL wording problem. The event table omits grouped update-columns, but the enum table is introduced as a main-event overview; this is not a new blocker. Keep the source limitation scoped to the connector's supported configuration path.

3. Architectural Soundness

3.1 Elegance of the Solution

Precise documentation fix with one remaining semantic correction.

3.2 Maintainability

Use actual parser keys and event packages; clarify alias versus physical-table routing.

3.3 Extensibility

No new architecture or implementation is needed.

3.4 Historical-Version Compatibility

No migration; examples use existing contracts and do not add new credential support.

4. Issue Summary

Number Issue Location Severity
1 First SQL alias described as first physical input only docs/en/transforms/sql.md:22 (and ZH) Medium

5. Merge Recommendation

Conclusion: Ready to merge after fixes

  1. Blockers — must be fixed
  • Issue 1: correct SQL multi-table semantics in both languages. Current-head CI is green.
  1. Recommended fixes — non-blocking
  • No production implementation change is needed. A short precise wording change is preferable to changing SQL behavior to match the current sentence.

The current comparison is diverged against dev: ahead 13, behind 8; merge state blocked. This is recorded independently; being behind alone is not a request to sync. Daniel has READ permission. This technical review does not dismiss another reviewer's record or replace effective approval by a write-capable maintainer.

…ckHouse type tables

- Correct the SQL transform plugin_input description (en and zh): the
  previous wording said the SQL reads the first table of the list, which
  implies a first-table-only filter. SQLTransform only takes the first
  plugin_input entry as the relation name (alias) passed to the SQL engine
  (SQLTransform constructor uses pluginInputIdentifiers.get(0) as
  inputTableName), while SQLMultiCatalogFlatMapTransform builds one
  transform per input catalog table and AbstractMultiCatalogFlatMapTransform
  routes rows by table ID, so every connected input table is processed.
  The wording now distinguishes the upstream identifier list from the SQL
  alias taken from its first entry and states transforms are applied per
  catalog table.
- Add a note above the ClickHouse sink type table (en and zh): the rows
  describe the column types ClickhouseTypeConverter.reconvert generates
  for save_mode_create_template auto-creation; the STRING and BIGINT rows
  additionally list broader existing column types the sink can write into,
  while the converter itself only emits String and Int64 for those.
- Add the missing source type rows (en and zh) produced by
  TypeConvertUtil.convert: Bool -> BOOLEAN and UUID / IPv4 / IPv6 -> STRING.
Retain the enum-complete event rows (schema-change events and
STAIN_TRACE) that the review verified against EventType.
nzw921rx
nzw921rx previously approved these changes Nov 25, 2026

@nzw921rx nzw921rx left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1 LGTM

@nzw921rx
nzw921rx added this pull request to the merge queue Nov 25, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to a conflict with the base branch Nov 25, 2026
@nzw921rx

Copy link
Copy Markdown
Member

Re-reviewed #12730 at 51a02380461d.

What changed

CDC guidance, ClickHouse type mapping, file connectors, job events and SQL trace usage.

Runtime path checked

ClickhouseTypeConverter.reconvert maps SeaTunnel INT to Int32 on generated DDL. The JDBC CDC examples use the configured snapshot and write semantics. The OBS filesystem configuration exposes the permanent access-key options used in the examples.

Review result

I rechecked earlier review feedback against this head. I found no new source-side blocker in the documentation diff.

Verification

I checked the full diff and prior review threads, compiled 22 changed Markdown/MDX pages, and checked the diff with git diff --check. The batch passed offline Spotless. Typesafe Config parsed 8 added or edited HOCON examples for this PR.
Local verification excludes Maven verify, live connector jobs and a full site build.

Merge conclusion

The required Build reports IN_PROGRESS for this SHA. Build check The source review is clear for this SHA. The required build gate is still pending.

@nzw921rx nzw921rx left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1

@nzw921rx
nzw921rx added this pull request to the merge queue Nov 25, 2026
Merged via the queue into apache:dev with commit 59acd45 Nov 25, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants