Repository navigation
[Docs] Fix CDC, InfluxDB, file and IM connector doc inaccuracies verified against source code - #12771
Conversation
…fied against source code
DanielLeens
left a comment
There was a problem hiding this comment.
Thanks for this careful docs sweep, @zhangshenghang! I went through the full diff of all 18 files (en and zh) and checked each claim against the connector source on the PR head. Almost everything is accurate, and the PostgreSQL-CDC schema-name fix in particular is a great catch. I found one new inaccuracy in the InfluxDB sink text that I think should be fixed before merge, plus one follow-up of the same kind as your PostgreSQL fix. Details below.
What Problem Does This PR Solve?
- User pain point: several connector pages describe options, defaults or examples that do not match the code. The worst case is the PostgreSQL-CDC examples using
schema-names, which the connector does not define, so the schema filter is silently ignored. - Fix approach: docs-only edits in
docs/enanddocs/zhfor PostgreSQL-CDC, MongoDB-CDC, Oracle-CDC, InfluxDB (source and sink), S3File, GcsFile, Socket, SftpFile and Feishu. - In one sentence: align documented options, defaults and examples with what the code actually does.
1. Code Change Review
1.1 Core Logic Analysis
No code is changed. I verified the factual claims against source on the PR head. Verified as correct:
- PostgreSQL-CDC: option key is
schema-name(PostgresIncrementalSourceOptions.java:46-47, read byPostgresSourceConfigFactory.java:51);server-time-zonedefault isZoneId.systemDefault()(JdbcSourceOptions.java:62-65);connect.timeout.msisLong(JdbcSourceOptions.java:83-86). - MongoDB-CDC:
formatis in the shared base rule (SourceOptions.java:107-111,getBaseRule()at:160); thedebeziumdefault map is the two*.converter.schemas.enable=falseentries (MongodbIncrementalSourceOptions.java:123-132). - InfluxDB source:
genSplitNumRangeclamps toupper - lowerwhenupperBound - lowerBound < numPartitions, i.e. whenpartition_numis greater than the range (InfluxDBSourceSplitEnumerator.java:219-220). The corrected sentence is right. - S3File sink:
multi_table_sink_replicais inS3FileSinkFactory.java:120. GcsFile source:date_format,datetime_format,time_format,metalake_type(defaultgravitino,EnvCommonOptions.java:143-145) are in the factory, and the other new rows are read by the shared read strategies (file_filter_modified_start,csv_use_header_line,sort_files_by_modification_time), which receive the full plugin config for GCS too. - The
age=26, Socketage: 17, SftpFile:::closing, FeishuMAP(...)(theMAPfunction exists inZetaSQLFunction) and S3File zh HOCON fixes are straightforward and correct.
Key findings:
- The edits are precise, scoped to docs, and keep en and zh in sync.
- One new statement is not accurate under default settings (Issue 1).
- The PostgreSQL
schema-namesmistake exists in other pages that this PR does not touch (Issue 2).
1.2 Compatibility Impact
Fully compatible. Docs only; no option, default, protocol or serialization change.
1.3 Performance / Side-Effect Analysis
None (documentation only).
1.4 Error Handling and Logging
Not applicable.
Issue 1: InfluxDB sink key_time now says "epoch milliseconds", but the unit is the configured epoch precision (default nanoseconds)
- Location:
docs/en/connectors/sink/InfluxDB.md:86-91anddocs/zh/connectors/sink/InfluxDB.md:85-89; code atDefaultSerializer.java:114-141. - Problem description: the new text says the field must be a
BIGINT"epoch-milliseconds value" (and a numericSTRINGepoch value). In the serializer,BIGINTand numericSTRINGvalues are passed straight tobuilder.time(value, precision), whereprecisioncomes from theepochoption (setPrecision(TimePrecision.getPrecision(config.get(InfluxDBSinkOptions.EPOCH)))). Theepochdoc a few lines below states that the defaultnis treated as nanoseconds. So with default settings aBIGINTkey_time is interpreted as nanoseconds, not milliseconds. A user who follows the new sentence and writes millisecond values with the defaultepochwill get timestamps near 1970. - Potential risk: the PR exists to remove misleading docs, and this sentence would replace one inaccuracy (ISO-8601) with another (unit), with a silent data-correctness effect for users.
- Best improvement: describe the unit as "an integer epoch value in the precision configured by
epoch(defaultn, nanoseconds)", for both theBIGINTand numericSTRINGcases, in en and zh. For theTIMESTAMPcase the code converts to epoch milliseconds and then still passes the configuredepochunit, so I would either leave the pre-existingTIMESTAMPwording as it was or add a short note that it is only consistent whenepoch = MS. Please do not claim more than the code does. - Severity: Medium (blocks merge, small doc edit)
- Raised by another reviewer: No
Issue 2: The same wrong schema-names key remains in other PostgreSQL examples that this PR does not touch (non-blocking)
- Location:
docs/en/connectors/cdc-production-cookbook.md:254anddocs/zh/connectors/cdc-production-cookbook.md:249(thePostgres-CDCblock), anddocs/en/getting-started/recipes/postgresql-cdc-to-iceberg.md:144plus the zh counterpart. - Problem description: these
Postgres-CDCexamples still useschema-names, which the Postgres connector does not define, so the same silent-ignore problem remains for readers of those pages. The Oracle-CDC occurrences are correct (OracleIncrementalSourceOptions.SCHEMA_NAMESisschema-names) and should stay. - Potential risk: low, but it is the exact user trap this PR is fixing.
- Best improvement: change those Postgres blocks to
schema-namein this PR (4 one-line edits) or in a small follow-up. - Severity: Low
- Raised by another reviewer: No
2. Code Quality Assessment
2.1 Coding Standards
Docs formatting matches the surrounding tables. No code, so no Javadoc concerns.
2.2 Test Coverage and Test Stability
Not applicable (no test changes).
2.3 Documentation Updates
This is the documentation. en and zh are consistent for every item that applies to both languages; the zh-only and en-only fixes were checked against the other language as the description says. One small note on the PR description: it says the new GcsFile rows are in GcsFileSourceFactory.optionRule(), but only some are (date_format, datetime_format, time_format, metalake_type); the other four are consumed by the shared read strategies. The docs rows themselves are fine.
3. Architectural Soundness
3.1 Elegance of the Solution
Precise fix.
3.2 Maintainability
Good: small, source-linked edits.
3.3 Extensibility
Not applicable.
3.4 Historical-Version Compatibility
No impact.
4. Issue Summary
| # | Issue | Location | Severity |
|---|---|---|---|
| 1 | InfluxDB sink key_time unit documented as milliseconds, but follows the epoch precision (default ns) |
docs/en/connectors/sink/InfluxDB.md:86-91, docs/zh/connectors/sink/InfluxDB.md:85-89 |
Medium |
| 2 | Postgres examples elsewhere still use schema-names |
docs/en/connectors/cdc-production-cookbook.md:254, docs/en/getting-started/recipes/postgresql-cdc-to-iceberg.md:144 (+ zh) |
Low |
5. Merge Recommendation
Conclusion: Ready to merge after fixes
- Blockers - must be fixed:
- Issue 1: correct the
key_timeunit wording (en and zh).
- Issue 1: correct the
- Recommended fixes - non-blocking:
- Issue 2: fix the remaining Postgres
schema-namesexamples.
- Issue 2: fix the remaining Postgres
CI on this head: no failing checks (docs-only change, most code jobs skipped). The branch is 2 commits behind dev and GitHub shows it as blocked only because a committer approval is still required; as a read-only reviewer I cannot give that approval. Overall this is a valuable cleanup and a very small edit away from done. Happy to re-review once you push an update!
…589f # Conflicts: # docs/en/connectors/source/GcsFile.md # docs/en/connectors/source/MongoDB-CDC.md # docs/zh/connectors/source/GcsFile.md # docs/zh/connectors/source/MongoDB-CDC.md
…s schema-names examples Per review feedback: - InfluxDB sink: the BIGINT/numeric-STRING key_time value is interpreted in the precision configured by the epoch option (default n, nanoseconds), not always epoch milliseconds; a TIMESTAMP value is converted to epoch milliseconds and only matches the point precision when epoch is MS. - Replace the undefined schema-names key with schema-name in the Postgres-CDC examples of cdc-production-cookbook and the postgresql-cdc-to-iceberg recipe (en and zh). Co-authored-by: multica-agent <github@multica.ai>
DanielLeens
left a comment
There was a problem hiding this comment.
Thanks for the quick turnaround, @zhangshenghang! I re-read the new commit on top of the merged dev and verified it against the connector source. Both items from my earlier review are resolved.
What Problem Does This PR Solve?
User pain point: Several connector and CDC docs contradicted the code (wrong option names, wrong defaults, missing options, wrong value formats), which leads users to configs that are silently ignored or behave differently than documented.
Fix approach: Source-verified doc edits across 22 files (en and zh kept in step): CDC, InfluxDB, file connectors and IM connectors.
One-sentence summary: Documentation-only accuracy pass; no code, option, default or protocol changes.
1. Code Change Review
1.1 Core Logic Analysis
Docs only. The last commit (0f665e2) changes six files: the InfluxDB sink key_time wording (en and zh) and the Postgres-CDC example key in cdc-production-cookbook.md and postgresql-cdc-to-iceberg.md (en and zh). The rest of the 22-file diff is unchanged from the head I reviewed before.
Verification against source on this head:
- InfluxDB
key_time:DefaultSerializer.createTimestampExtractorpasses BIGINT, numeric STRING and TIMESTAMP (converted withtoEpochMilli()) all tobuilder.time(value, precision), andprecisioncomes from theepochoption viaTimePrecision.getPrecision, which falls back toNSfor any unrecognised value (including the defaultn). The new wording ("epoch value in the precision configured byepoch(defaultn, nanoseconds)", and TIMESTAMP "only matches the point precision whenepochis set toMS") matches the code exactly, en and zh. - Postgres examples now use
schema-name, consistent withPostgreSQL-CDC.md(schema-name, lines 105/244/273). The remainingschema-namesoccurrences in docs (Oracle-CDC.md, the Oracle block in the cookbook, schema-evolution, field/table-rename transforms) are Oracle-CDC examples, whereschema-namesis the correct key. I did not find any remaining Postgresschema-namesexample.
1.2 Compatibility Impact
Fully compatible. No option, default, serialization or checkpoint change.
1.3 Performance / Side-Effect Analysis
None (documentation only).
1.4 Error Handling and Logging
Not applicable. No open issues.
2. Code Quality Assessment
2.1 Coding Standards
Formatting matches the surrounding tables and prose.
2.2 Test Coverage and Test Stability
No test changes, none needed.
2.3 Documentation Updates
This is the documentation. en and zh are consistent for every edit that applies to both languages.
3. Architectural Soundness
3.1 Elegance
Precise fix.
3.2 Maintainability
Small, source-linked edits.
3.3 Extensibility
Not applicable.
3.4 Historical-Version Compatibility
No impact.
4. Issue Summary
| Number | Issue | Location | Severity |
|---|---|---|---|
| - | No open issues (previous Issue 1 and Issue 2 are fixed) | - | - |
5. Merge Recommendation
Conclusion: Ready to merge
- Blockers - must be fixed: none found.
- Recommended fixes - non-blocking: none. Residual risk: I spot-checked the unchanged part of the 22-file diff only through my previous full review; this pass focused on the delta and the two earlier findings.
Overall assessment: both of my earlier notes (InfluxDB time unit, remaining Postgres schema-names) are fixed accurately. CI on this head has no failing checks (docs-only, Build/labeler/notify all success); the branch is up to date with dev and is "blocked" only by the pending committer approval. Nice work!
DanielLeens
left a comment
There was a problem hiding this comment.
Quick update on the CI fact cited in my previous review: the Build check on head 0f665e211 is now green. My previous review found no source-level blocker and CI was the only remaining gate, so I am updating my conclusion to approve. The formal merge still needs a committer with write access. Thanks again for the contribution!
davidzollo
left a comment
There was a problem hiding this comment.
Thanks for addressing the earlier notes on the InfluxDB time unit and the Postgres schema-names rows. The head is unchanged since review and Build is green. Approving and queueing for merge.
Purpose of this PR
This PR fixes a batch of real documentation issues found by comparing the docs against the actual connector source code on
dev. All findings were verified against the code before editing, and every issue is fixed in both the English and Chinese docs.What was changed
PostgreSQL-CDC (en/zh)
schema-names; the connector only definesschema-name(PostgresIncrementalSourceOptions.java). Because of the wrong key, schema filtering silently did not apply. Fixed the examples and added the missingschema-namerow to the options table.server-time-zonedefault was documented asUTC, but the code default isZoneId.systemDefault().getId()(JdbcSourceOptions.java); changed to-, consistent with the MySQL-CDC/Oracle-CDC pages (the row description already explained the real behavior).connect.timeout.mstype was documented asDuration, but the code declareslongType(); changed toLong.MongoDB-CDC (en/zh)
formatoption row (DEFAULT/COMPATIBLE_DEBEZIUM_JSON, defined in the CDC baseSourceOptionsand applied byMongodbIncrementalSource), mirroring the MySQL-CDC page.debeziumdefault was documented as-, but the MongoDB option overrides the base option with the default map{key.converter.schemas.enable=false, value.converter.schemas.enable=false}(MongodbIncrementalSourceOptions.java).InfluxDB source (en/zh)
partition_numsplit description was inverted: the code clamps the partition count down toupper_bound - lower_boundwhenpartition_numis greater than the range (InfluxDBSourceSplitEnumerator.genSplitNumRange), not when it is less.InfluxDB sink (en/zh)
key_timeclaimed ISO-8601 timestamp strings are accepted, but the serializer only doesLong.parseLongfor STRING fields (DefaultSerializer.createTimestampExtractor); an ISO-8601 string would throwNumberFormatException. Rewrote the description (BIGINT epoch millis / numeric STRING / TIMESTAMP with UTC conversion) and clarified the STRING row of the type-mapping table.Oracle-CDC (en)
GRANT LOGMININGstatement) read as if Oracle CDC does not support Oracle 11g, contradicting the FAQ on the same page. Reworded to "The following privilege is not supported on Oracle 11g", matching the Chinese page.S3File (en/zh)
parse_partition_from_pathexample said the path.../age=26addsage=16; fixed toage=26.multi_table_sink_replicarow (present inS3FileSinkFactory.optionRule()and documented on other file-sink pages).S3File (zh only, en was already correct)
field_delimitersaid it is only used fortext, but the code applies it totextandcsv(BaseFileSinkConfig); fixed in the table and the section description.merge_update_eventdescription was truncated mid-sentence; completed it to explain the UPDATE_BEFORE/UPDATE_AFTER merging behavior.source {block was closed by a stray nestedsource { }instead of}, sotransform/sinkended up nested insidesource. Fixed to match the English page.GcsFile source (en/zh)
GcsFileSourceFactory.optionRule()/ the shared reader but were undocumented (all are documented on the S3 page):date_format,datetime_format,time_format,csv_use_header_line,file_filter_modified_start,file_filter_modified_end,sort_files_by_modification_time,metalake_type.Socket sink (en only, zh was already correct)
age: 12produces{"name":"jared","age":17}; fixed the input toage: 17.SftpFile sink (zh only)
:::tipadmonition block was never closed, so the rest of the page (key features onward) fell inside the tip container; added the closing:::to match the English page.Feishu sink (zh only)
named_struct(...), a function that does not exist in SeaTunnel SQL (the correctMAP(...)is used on the English page); the ZH example would fail at runtime.Which areas / files were updated
18 documentation files (
docs/en+docs/zh), all underdocs/*/connectors/:source/PostgreSQL-CDC.md,source/MongoDB-CDC.md,source/Oracle-CDC.md,source/InfluxDB.md,source/S3File.md,source/GcsFile.mdsink/InfluxDB.md,sink/S3File.md,sink/Socket.md,sink/Feishu.md,sink/SftpFile.md(and theirdocs/zhcounterparts)No code was changed in this PR.
Were both English and Chinese docs checked?
Yes. Every issue above was fixed in both languages where applicable; for issues that existed only in one language (SftpFile tip block, Feishu
named_struct, ZH S3File table/示例, EN Socket example, EN Oracle-CDC heading), the other language was verified as already correct.How duplicate PRs were checked
I reviewed all SeaTunnel PRs opened in the last 7 days (by any author), including the docs batches #12758, #12730, #12709, #12693 and #12679, plus #12663 and #12703. I programmatically compared the union of the files touched by those PRs with the 18 files changed here: zero file overlap. This PR therefore does not repeat any recent fix; the connectors above (PostgreSQL-CDC, MongoDB-CDC, Oracle-CDC, InfluxDB, S3File, GcsFile, Socket, SftpFile, Feishu) were not covered by them.
How the change was verified
OptionRules, split-enumeration and serializer code paths), referenced above by class names.schema-names,named_struct).mvnw verify/ site build was not run because this PR contains documentation-only changes; no Java code, configuration, or build files were touched.