Repository navigation
[Docs] Fix connector doc inaccuracies verified against source code - #13390
Conversation
DanielLeens
left a comment
There was a problem hiding this comment.
Thanks for contributing to Apache SeaTunnel! I reviewed the complete current diff and followed its entry points and failure paths. The items below need attention before merging; I hope the concrete paths make the next step straightforward.
What problem does this PR solve?
User pain point: connector guides describe wrong option types, counter scope and failure behavior.
Fix approach: correct 35 English/Chinese documentation files against existing implementations.
One sentence: mostly useful documentation corrections, with one SQL Server selector claim that contradicts the actual public factory.
Example: removing both SQL Server table selectors does not capture all tables; it fails configuration validation before any reader starts.
1. Code changes
1.1 Core logic
Complete runtime path:
Documented job configuration -> FactoryUtil factory validation -> SqlServerIncrementalSourceFactory.optionRule():63
-> ConfigValidator.checkExclusive():437-459 -> zero selectors: configuration error
AssertSinkWriter.write():108-110 -> shared table counter -> close():124-191 -> last open writer checks row rules
CassandraSinkWriter.write():81-87 -> append -> getAndIncrement >= batch_size -> flush
DataHubWriter.write():90-105 -> failed-record retry():113-124 -> log/drop paths
FakeSourceSplitEnumerator.run():63-67 -> discovery -> splitId % parallelism -> reader assignment
File/Sentry/Paimon Option definitions -> enum/int/map parsing; VitessSourceConfig:190-201 -> authentication properties
Key findings and correctness:
Normal users reach the documented factory and writer paths. The shared Assert counter/last-writer close description agrees with AssertSinkWriter:49-61,124-133. Cassandra really appends before testing the preincrement value, so a full synchronous flush has batch_size+1 rows. DataHub can log unsuccessful writes without notifying the engine; checkpointing cannot reconstruct that missing failure signal. SeaTunnelRow:32 stores an empty-default String tableId. FileBaseSinkOptions:308-312 is an enum, SentrySinkOptions:43-57 are integers, PaimonBaseOptions:113 declares a map, FakeSource assigns splits to parallel readers, and Vitess exposes the two authentication options. The Chinese InfluxDB addition aligns with the existing English multi-table warning. The SQL Server change is the exception: exclusive means exactly one, not at most one. No runtime code or registry entry is changed.
Before:
## Streaming Validation
Assert works in both `BATCH` and `STREAMING` job modes. Field rules (`NOT_NULL`, `MIN_LENGTH`, `MAX_LENGTH`, etc.) are checked on every row as it arrives at the sink writer. Row count rules (`MIN_ROW` / `MAX_ROW`) are evaluated **exactly once** when the sink writer closes (at job shutdown, savepoint, or failure), against the cumulative row count observed by that writer instance since it was created — not per checkpoint window, and not reset between checkpoints. If you need per-checkpoint-window row-count validation, that requires a source code change (out of scope for a docs update).
## Example
After:
## Streaming Validation
Assert works in both `BATCH` and `STREAMING` job modes. Field rules (`NOT_NULL`, `MIN_LENGTH`, `MAX_LENGTH`, etc.) are checked on every row as it arrives at the sink writer. Row count rules (`MIN_ROW` / `MAX_ROW`) are evaluated **exactly once** when the sink writer closes (at job shutdown, savepoint, or failure). The counter is shared by every parallel writer of the same table inside one process (Flink subtasks, Zeta parallel tasks on one node), so the rules are checked against the whole-table total accumulated across all those writers, and the last writer of the table to close performs the check — not per checkpoint window, and not reset between checkpoints. If you need per-checkpoint-window row-count validation, that requires a source code change (out of scope for a docs update).
## Example
1.2 Compatibility
Fully compatible at runtime: no API, option key/default, protocol, row/checkpoint serialization or execution behavior changes. This PR must describe the existing contract accurately, particularly exactly-one selector validation.
1.3 Performance and side effects
Documentation only: no CPU, memory/GC, network, lock, concurrency, retry, idempotency or resource-release behavior changes. The DataHub and Cassandra notes describe existing operational limits.
1.4 Errors, logging, and findings
Issue 1: Do not document an omitted-selector configuration that the factory rejects
- Location:
docs/en/connectors/source/SqlServer-CDC.md:85. - Description and risk: Both updated table rows say omitting table-names and table-pattern captures all CDC-enabled tables; the Chinese rows repeat this. The normal public factory declares .exclusive(TABLE_NAMES,TABLE_PATTERN) at SqlServerIncrementalSourceFactory.java:63. ConfigValidator.checkExclusive at 437-452 rejects count==0 with "exactly one option must be set, but none are configured". A reader never starts for the advertised configuration.
- Best improvement: Keep exactly-one-required wording in both guides; to document all-table capture, provide an explicit matching table-pattern accepted by the factory. This documentation PR should not weaken the shared validator or expand runtime selection semantics.
- Responsibility and trade-off: The documentation is the right responsibility boundary: preserve runtime behavior and correct the guides. The smallest safe correction and best solution here are the same: match the actual public factory/writer contract in both languages. Changing global validation or adding runtime behavior solely to make a sentence true would expand scope and regression cost.
- Severity: Medium; blocking: true.
- Previously raised by another reviewer: No, unless explicitly attributed above.
Community input: no independent technical finding or maintainer approval/change request was present in the collected discussion.
2. Code quality
2.1 Conventions
Reviewed all changed files for license, imports, naming, core-method and state-field comments. See the numbered findings for the required changes.
2.2 Test coverage and stability
Stability rating: Stable. No UT/E2E changes; flakiness rating is not applicable. Both exact-head Build signals report success for this docs-only head, but skipped connector lanes are not evidence of connector execution. Static option and call-chain checks establish Issue 1; no job was run locally.
2.3 Documentation
Reviewed all 35 changed English/Chinese files and compared the affected Option definitions, writer branches and source validation. Issue 1 affects both SQL Server guides. Existing unrelated runtime defects described by the docs are not fixes delivered by this PR.
3. Architecture
3.1 Change location
The documentation is the right responsibility boundary: preserve runtime behavior and correct the guides. The smallest safe correction and best solution here are the same: match the actual public factory/writer contract in both languages. Changing global validation or adding runtime behavior solely to make a sentence true would expand scope and regression cost.
3.2 Maintainability
Keep the behavior, lifecycle ownership, and failure contract together. The documentation is the right responsibility boundary: preserve runtime behavior and correct the guides. The smallest safe correction and best solution here are the same: match the actual public factory/writer contract in both languages. Changing global validation or adding runtime behavior solely to make a sentence true would expand scope and regression cost.
3.3 Extensibility
Prefer the existing component boundary and tests over unrelated shared abstractions.
3.4 Upgrade impact
Fully compatible at runtime: no API, option key/default, protocol, row/checkpoint serialization or execution behavior changes. This PR must describe the existing contract accurately, particularly exactly-one selector validation.
4. Findings summary
Completeness check: All changed files and affected entry/failure paths were reviewed; configuration/serialization compatibility, test failure capability and stability, documentation/examples, change ownership, and current CI/conflict/review gates are covered above. No unreviewed source scope is claimed complete.
| # | Finding | Location | Severity |
|---|---|---|---|
| 1 | Do not document an omitted-selector configuration that the factory rejects | docs/en/connectors/source/SqlServer-CDC.md:85 |
Medium |
5. Merge recommendation
Merge after fixes
Blocking items: Issues 1. Current-head CI and write-capable maintainer review remain independent requirements.
Non-blocking suggestions: None beyond the validation limits above.
Overall: the approach addresses a real path, but the listed blockers must be closed. Daniel has READ permission, so this COMMENT cannot dismiss historical requested changes or satisfy a write-capable maintainer approval gate.
CI and repository state: Signal pull request update: SUCCESS; Build: SUCCESS; Build: success. GitHub reports BLOCKED / REVIEW_REQUIRED.
Verification: Reviewed all changed files and the referenced call sites at d4043c7b2a33bdb1e70f61f490ceddd8133438a8 against merge base 7029c0969a9f6ea9add7a11f9262f42fe2ce9da9. git diff --check passed. I did not build, run tests, or execute SeaTunnel locally.
Review time: 2026-11-23T06:43:31.642235-05:00
Local evidence: git fetch obtained head d4043c7b2a33bdb1e70f61f490ceddd8133438a8; git merge-base returned 7029c0969a9f6ea9add7a11f9262f42fe2ce9da9; git diff --stat reports 35 files changed, 46 insertions(+), 38 deletions(-). git show and source searches were used for the entry points above. No local build, unit test, E2E, Docker run or service startup was executed.
…rn in SQL Server CDC guides SqlServerIncrementalSourceFactory declares .exclusive(TABLE_NAMES, TABLE_PATTERN) and ConfigValidator.checkExclusive rejects a config that sets neither, so the 'omit both to capture all tables' wording in en/zh described a configuration no reader can start. State the exactly-one-required contract and point readers at a matching table-pattern for all-table capture.
|
Re-reviewed #13390 at a1e069895609. What changedSink options and lifecycle notes for Assert, Cassandra, DataHub and file connectors, plus selected source option tables. Runtime path checked
Review resultI rechecked earlier review feedback against this head. I found no new source-side blocker in the documentation diff. VerificationI checked the full diff and prior review threads, compiled 31 changed Markdown/MDX pages, and checked the diff with Merge conclusionThe required |
Yes, I am contributing to Apache SeaTunnel.
What documentation issues were found
While comparing connector documentation against the actual Java option definitions and runtime code on the current
devbranch (commit 7029c09), the following verified inaccuracies were found:en/zh× CosFile, FtpFile, HdfsFile, LocalFile, OssFile, OssJindoFile, S3File, SftpFile): the### csv_string_quote_mode [string]section header contradicted both the option table (enum) and the code (FileBaseSinkOptions.CSV_STRING_QUOTE_MODEis.enumType(CsvStringQuoteMode.class)). Changed all 16 headers to[enum].en/zh): (a) thebatch_sizesection header said[number]while the table and code (.intType()) say int →[int]; (b) the notes claimed a sync batch holds "at mostbatch_sizestatements", butCassandraSinkWriter.write()appends the row before checking the counter (getAndIncrement() >= batchSize), so a flush actually executesbatch_size + 1statements. Reworded both.en/zh):maxCacheItems/maxQueueSizeheaders said[number]; code declares.intType()→[int].en/zh):paimon.hadoop.confheader said[string]; code is.mapType()(PaimonBaseOptions) →[map].en/zh):table-namesandtable-patternwere both marked plain required while being documented as mutually exclusive (self-contradictory).SqlServerIncrementalSourceFactory.optionRule()registers them only as.exclusive(...)(neither.required()), andSqlServerSourceConfigFactoryomitstable.include.listwhen both are unset, capturing all CDC-enabled tables ofdatabase-names. Changed to "Conditionally required"/"条件必填" with the both-omitted behavior documented, matching the wording already used byMySQL-CDC.mdfor the identical code pattern.en/zh): the option table omittedusername/password, whichVitessSourceOptionsdefines andVitessSourceFactory.optionRule()accepts (optional VTGate gRPC credentials). Added both rows.en/zh): claimed failures beyond the retry budget "are surfaced to the job".DataHubWriter.write()catchesDatahubClientExceptionand only logs it;retry()also only logs on final failure. Corrected to state records are logged and dropped (best-effort), so checkpointing does not provide at-least-once replay.en/zh): claimed single-table jobs printtableId=-1.SeaTunnelRow.tableIdis aString(default empty), and sources set it to the table path (e.g. FakeSource setscatalogTable.getTableId().toTablePath().toString()).-1is the pre-String-era output. Reworded accordingly.en/zh): the feature list marked parallelism unchecked, contradictingFakeSource implements SupportParallelism,FakeSourceSplitEnumerator(splitId % currentParallelism), and the doc's own split-assignment note. Checked the box.en/zh): describedMIN_ROW/MAX_ROWas evaluated against "the cumulative row count observed by that writer instance".AssertSinkWriterkeeps JVM-staticLongAccumulatorcounters shared by every parallel writer of a table, evaluated by the last writer of the table to close. Corrected the scope description.zhonly): thewherereserved-option note was missing thetables_configsparagraph that theendoc already has (configuringwherein a table entry fails at build time withOptionValidationException; the multi-table split parser is case-insensitive onwhere).What was changed / which areas were updated
35 documentation files under
docs/en/connectorsanddocs/zh/connectors(source + sink): CDC (SqlServer, Vitess), file sinks (8 connectors × csv option header), Paimon, Cassandra, Sentry, DataHub, Console, FakeSource, Assert, InfluxDB. Every change is backed by the cited code location; no formatting-only churn, no unrelated edits.Were English and Chinese docs both checked?
Yes. Every issue was fixed in both the
enandzhversions where the content exists. The only single-language change is item 11 (zhInfluxDB), where theendoc already contained the correct paragraph andzhwas lagging behind.How duplicate PRs from the last 7 days were checked
Before implementing and again before opening this PR, I listed all PRs created in the last 7 days (
gh pr listwith authorzhangshenghangplus repo-wide doc searches) and inspected the changed-file lists of #13380, #13379, #13327, #13292, #13289, #13284, #13302, #13274, #13282. None of them covers the connectors or issues fixed here: #13380 touches Clickhouse/Redis/Elasticsearch/Pulsar/RocketMQ/Maxcompute/IoTDB/HugeGraph/Neo4j/LLM/Replace/Zeta REST; #13327 touches CDC MongoDB/PostgreSQL/Opengauss + Http/Kafka + transforms; #13302 touches JDBC-family + getting-started; #13289 aligns file-connector option tables (itscsv_string_quote_modechange is on the table rows, not the section headers fixed here — checked its diff explicitly, no heading lines touched); #13284 touches FtpFile/LocalFile/Paimon sink examples. The remaining open@sitelink indocs/zh/engines/zeta/rest-api-v2.mdwas deliberately left untouched because #13380 already fixes it.How the change was verified
docs/enanddocs/zh: no new broken links (the only remaining hit is the pre-existing@siteline owned by [Docs] Fix connector doc inaccuracies verified against source code #13380).cursor.stop.mode/auth_type(owned by [Docs] Fix connector doc inaccuracies verified against source code #13380) and anint/Integerwording difference that is semantically identical.upstream/dev).apache/seatunnel-websiterepository; the link, table, and consistency checks above cover the changed markdown.Scope
35 documentation files, 46 insertions / 38 deletions — all real content corrections satisfying the multi-file scope.