Repository navigation
[Docs] Fix connector and CDC doc inaccuracies verified against source code - #12813
Conversation
DanielLeens
left a comment
There was a problem hiding this comment.
Thanks for this PR, @zhangshenghang. Checking connector docs against the real option definitions is exactly the kind of work that keeps users out of trouble, and I traced almost every claim in the description back to the source. Nearly all of them hold up. I found one new inaccuracy that I think should be fixed before merge (a Redis table cell that contradicts the PR's own new prose), plus a few small non-blocking items. Details below.
What Problem Does This PR Solve?
- User pain point: Several connector docs describe options, defaults, required flags and type mappings that do not match the code (TDengine column order, Redis
single_field_name, Snowflake type mapping, SQL Server CDC option names and defaults, several missing options, one zh/en drift). - Fix approach: 20 doc files (en/zh pairs, plus a zh-only parity port for SQL Server CDC and two zh-only text fixes) are corrected against the source.
- One-sentence summary: A docs-only accuracy pass that is almost entirely correct, with one newly introduced Redis "Required" cell that is wrong for the table it sits in.
1. Code Change Review
1.1 Core Logic Analysis
No production code is touched (docs only), so the "normal path" question reduces to: does each documented statement match the code that runs? I verified these against the PR head (823f5b2):
| Doc change | Source checked | Result |
|---|---|---|
TDengine: output order follows desc order, read_columns is only a filter |
TDengineSourceConfig (readColumns is a Set), TDengineSource.getStableMetadata (loops desc <db>.<stable>, continues when not in read_columns) |
Correct |
Snowflake: GEOGRAPHY/GEOMETRY map to STRING, BINARY/VARBINARY to BYTES, LTZ/TZ to TIMESTAMP_TZ, no p > 38 clamp when reading |
SnowflakeTypeConverter.convert |
Correct for the Snowflake-to-SeaTunnel direction (see Issue 2 for the sink doc) |
Snowflake sink: generate_sink_sql (Boolean, false) |
JdbcSinkOptions.GENERATE_SINK_SQL |
Correct |
Redis top level: single_field_name required whenever read_key_enabled = true |
RedisSourceFactory.optionRule .conditional(READ_KEY_ENABLED, true, SINGLE_FIELD_NAME) |
Correct for the single-table (outer) configuration |
SQL Server CDC: connect.timeout.ms (Long, 30000), server-time-zone defaults to ZoneId.systemDefault() |
JdbcSourceOptions.CONNECT_TIMEOUT_MS, SERVER_TIME_ZONE |
Correct |
SQL Server CDC: table-names / table-pattern are exclusive, one of them needed |
SqlServerIncrementalSourceFactory.optionRule .exclusive(...) |
Correct |
| SQL Server CDC zh: three sections ported from en | compared paragraph by paragraph with the en doc | Faithful translation |
Vitess CDC username / password |
VitessSourceOptions, factory rule, VitessSourceConfig |
Correct |
TiDB CDC driver |
TiDBCatalogFactory.createCatalog reads JdbcCommonOptions.DRIVER; AbstractJdbcCatalog treats null as optional |
Correct |
DB2 CDC split.allow-sampling |
JdbcSourceConfigFactory.fromReadonlyConfig reads it; Db2ChunkSplitter extends AbstractJdbcSourceChunkSplitter |
Behavior correct (see Issue 4 on the factory rule) |
Sls sink log_group_size |
SlsSinkOptions.LOG_GROUP_SIZE; SlsSinkWriter stores it but sends one PutLogsRequest per record |
Correct (see Issue 4) |
Milvus zh rate_limit wording, replace zh code span |
compared with the en doc and the transform example | Correct |
1.2 Compatibility Impact
Fully compatible. Documentation only; no options, defaults, protocols or serialization formats change. Nothing belongs in incompatible-changes.md.
1.3 Performance / Side-Effect Analysis
Not applicable (docs only). No runtime, memory, concurrency or resource effect.
1.4 Error Handling and Logging
Not applicable to the code, but the documentation is what users rely on to understand failures, so these are the issues I found.
Issue 1: Redis tables_configs table now says single_field_name is required whenever read_key_enabled = true, which is not what the code enforces there
- Location:
docs/en/connectors/source/Redis.md:84anddocs/zh/connectors/source/Redis.md:80 - Problem description: The
single_field_namerow was edited inside the "Table list configuration" table (the table that documents entries oftables_configs). The new cell reads "yes when read_key_enabled = true". But the condition that makes it required is the top-level.conditional(READ_KEY_ENABLED, true, SINGLE_FIELD_NAME)inRedisSourceFactory.optionRule. Fortables_configsentries,RedisTableConfigsValidatoronly checkskeysanddata_type, and at runtimeJsonKeyValueMerger.setValueInNode(JsonKeyValueMerger.java:79-83) only needs the name when the value is a single (non-object) value. So ahashentry intables_configswithread_key_enabled = trueand nosingle_field_nameis valid. The PR's own new prose (Redis.md:181-182: "Entries oftables_configsare not affected by this validation: theresingle_field_nameis only needed for single-value types") says exactly that, so the table cell and the prose now contradict each other, and the table is the first thing readers look at. - Potential risk: Users of multi-table configs will add an unnecessary option to hash entries, or conclude the docs are unreliable. This is the same class of mistake the PR sets out to remove.
- Best improvement: Make the per-table cell precise, for example:
yes for single-value types (string, list, set, zset) when read_key_enabled = true(and the equivalent wording in the zh doc). The outer-level requirement is already described correctly in the prose and the### single_field_namesection. - Severity: Medium (blocking, because it is a new inaccuracy in a PR whose purpose is accuracy, and it is a one-line fix)
- Raised by another reviewer: No
Issue 2: Snowflake sink doc type table is the read direction, and the removed p > 38 row described a real sink behavior
- Location:
docs/en/connectors/sink/Snowflake.md:40-60(and the zh counterpart) - Problem description: The "Data Type Mapping" table in the sink doc is headed "Snowflake Data Type to SeaTunnel Data Type", i.e.
SnowflakeTypeConverter.convert. What a sink uses isreconvert(SeaTunnel type to Snowflake type, used for auto-created tables). The PR is right thatconvertnever clamps decimals, butreconvertdoes clamp: whenprecision > MAX_PRECISION (38)it sets precision to 38 and reduces scale by the overflow (and caps scale at 37). The old row saidDECIMAL(38, 18), which was wrong in the details, but deleting it also removes the only mention of the clamp from the sink doc. Likewisereconvertmaps SeaTunnelBYTEStoGEOMETRY, which neither the old nor the new sink table tells the reader. - Potential risk: A user sizing decimals for a Snowflake sink gets no hint that precision above 38 is rewritten, and may read the table in the wrong direction. Low blast radius, because it only matters for auto-created tables.
- Best improvement: Option A (small): keep the table as is, but add one sentence under it for the sink doc: "When the sink creates a table, SeaTunnel
DECIMAL(p, s)withp > 38is reduced to precision 38 (scale reduced by the same overflow, max 37)". Option B (better, can be a follow-up): replace the sink table with thereconvertdirection (SeaTunnel type to Snowflake type). - Severity: Medium
- Raised by another reviewer: No
Issue 3: Sls log_group_size documented as an option but not declared in the sink factory rule
- Location:
docs/en/connectors/sink/Sls.md:44,SlsSinkFactory.optionRule(SlsSinkFactory.java:48) - Problem description: The doc is accurate (the writer reads the option and then ignores it), but
optionRule()lists onlySOURCEandTOPICas optional. Documenting a no-op option as a user-facing parameter, while the factory rule does not know about it, keeps doc and rule out of sync and invites users to tune something that does nothing. - Potential risk: Minor user confusion; Web-UI option prompts built from
optionRulewill not show it. - Best improvement: Either leave as is (the "Reserved ... no effect yet" wording is honest and clear), or in a separate change declare it in the rule. I would not block on this.
- Severity: Low
- Raised by another reviewer: No
Issue 4: DB2 CDC split.allow-sampling is honored at runtime but not declared in Db2IncrementalSourceFactory.optionRule
- Location:
docs/en/connectors/source/DB2-CDC.md:90,Db2IncrementalSourceFactory.java:56-78 - Problem description: The option works (
JdbcSourceConfigFactory.fromReadonlyConfigreads it andDb2ChunkSplitterextendsAbstractJdbcSourceChunkSplitter), and the doc entry is correct. The SQL Server factory listsSPLIT_ALLOW_SAMPLINGin its optional rule, DB2 does not. This is a code-side gap that the doc fix surfaced, not a doc error. - Potential risk: None for users reading the docs; only the Web-UI/option-rule listing is incomplete.
- Best improvement: Optional follow-up PR adding
SPLIT_ALLOW_SAMPLINGto the DB2 rule. Not for this PR. - Severity: Low
- Raised by another reviewer: No
2. Code Quality Assessment
2.1 Coding Standards
Docs only. Markdown is consistent with the surrounding files. One style nit: a few new table rows in SqlServer-CDC (Yes, if table-pattern is not set) make the Required column much wider than its neighbours; fine to keep.
2.2 Test Coverage and Test Stability
No test code changed. A docs-only change needs no new tests. The author's local check (fence balance, table column counts, relative links) is a reasonable substitute. Test-stability rating: not applicable (no tests changed).
2.3 Documentation Updates
docs/enanddocs/zhare updated in matched pairs for all 19 paired files; the zh-only items (SqlServer-CDC sections, Milvus wording, replace code span) bring zh in line with en, and I checked the ported SQL Server sections are faithful.- The only en/zh content mismatch I found is the Redis cell in Issue 1, which is wrong in both languages.
3. Architectural Soundness
3.1 Elegance of the Solution
Precise fix. Each change is small and traceable to a source line.
3.2 Maintainability
Good. Because the PR description lists the source class behind each correction, future reviewers can re-verify quickly.
3.3 Extensibility
Nothing to add. Issues 3 and 4 hint that a small CI check comparing documented option names with OptionRule entries could catch this class of drift automatically, but that is out of scope here.
3.4 Historical-Version Compatibility
Fully compatible; no upgrade action.
4. Issue Summary
| # | Issue | Location | Severity |
|---|---|---|---|
| 1 | Redis per-table single_field_name cell contradicts the code and the PR's own prose |
docs/en/connectors/source/Redis.md:84, docs/zh/connectors/source/Redis.md:80 |
Medium (blocking) |
| 2 | Snowflake sink type table is the read direction; removed row hid the real reconvert clamp |
docs/en/connectors/sink/Snowflake.md:40-60 |
Medium |
| 3 | log_group_size documented but absent from SlsSinkFactory.optionRule |
docs/en/connectors/sink/Sls.md:44 |
Low |
| 4 | split.allow-sampling not declared in Db2IncrementalSourceFactory.optionRule |
DB2-CDC.md:90 |
Low |
5. Merge Recommendation
Conclusion: Ready to merge after fixes
CI on the head is green (Build, labeler, Notify test workflow all succeeded). The branch is diverged from dev (ahead 1, behind 2); GitHub currently shows the PR as blocked only on review, with no conflicts, and I do not see a reason to ask for a sync.
-
Blockers - must be fixed
- Issue 1 (Medium): correct the Redis
tables_configssingle_field_nameRequired cell in both en and zh so it matches the validator and the new prose.
- Issue 1 (Medium): correct the Redis
-
Recommended fixes - non-blocking
- Issue 2 (Medium): add one sentence on the sink-side decimal clamp (or switch the sink table to the
reconvertdirection in a follow-up). It does not block because the new content is accurate for the direction it describes and the old row was itself inaccurate. - Issues 3 and 4 (Low): doc-versus-
OptionRulegaps that exist in code; fine as follow-ups.
- Issue 2 (Medium): add one sentence on the sink-side decimal clamp (or switch the sink table to the
Overall assessment: A careful and useful accuracy pass; I could confirm every other correction against the source, including the zh SQL Server port. With the one-line Redis cell fixed this is good to go. There is no better alternative approach to suggest. Happy to re-review as soon as you push an update!
# Conflicts: # docs/en/connectors/source/SqlServer-CDC.md # docs/zh/connectors/source/SqlServer-CDC.md
DanielLeens
left a comment
There was a problem hiding this comment.
Thanks for the update, @zhangshenghang, and for keeping this PR in sync with dev. I re-read the whole diff from scratch on the new head (65960bf), re-traced the claims against the source, and also checked what changed since my last review (823f5b2). The only new commit is a merge of origin/dev; the 20 documentation files in this PR are byte-for-byte the same as before. That means the findings from my previous review are still open. The good news is that the blocker is still a one-line fix per language, and everything else in this docs-accuracy pass continues to hold up.
What Problem Does This PR Solve?
- User pain point: Several connector docs describe options, defaults, required flags and type mappings that do not match the code (TDengine column order, Redis
single_field_name, Snowflake type mapping, SQL Server CDC option names and defaults, several undocumented options, one zh/en drift). - Fix approach: 20 doc files (en/zh pairs, plus a zh-only parity port for SQL Server CDC and two zh-only text fixes) are corrected against the source.
- One-sentence summary: A docs-only accuracy pass that is almost entirely correct, with one newly introduced Redis "Required" cell that is wrong for the table it sits in.
1. Code Change Review
1.1 Core Logic Analysis
No production code is touched, so the "does the normal path reach the changed logic" question reduces to: does each documented statement match the code that actually runs? Re-verified on head 65960bf:
| Doc change | Source checked | Result |
|---|---|---|
TDengine: output order follows desc order, read_columns is only a filter |
TDengineSourceConfig (read_columns collected into a Set), TDengineSource (iterates desc <db>.<stable>, skips columns not in read_columns) |
Correct |
Snowflake: GEOGRAPHY/GEOMETRY map to STRING, BINARY/VARBINARY to BYTES, LTZ/TZ to TIMESTAMP_TZ, no p > 38 clamp on read |
SnowflakeTypeConverter.convert (OFFSET_DATE_TIME_TYPE for LTZ/TZ) |
Correct for the Snowflake-to-SeaTunnel direction (see Issue 2 for the sink doc) |
Snowflake sink generate_sink_sql (Boolean, false) |
JdbcSinkOptions.GENERATE_SINK_SQL |
Correct |
Redis top level: single_field_name required whenever read_key_enabled = true |
RedisSourceFactory.optionRule() has .conditional(READ_KEY_ENABLED, true, SINGLE_FIELD_NAME) at the top level only |
Correct for the single-table (outer) configuration, wrong for tables_configs entries (Issue 1) |
SQL Server CDC: connect.timeout.ms (Long, 30000), server-time-zone default ZoneId.systemDefault() |
JdbcSourceOptions.CONNECT_TIMEOUT_MS, SERVER_TIME_ZONE |
Correct |
SQL Server CDC: table-names / table-pattern exclusive, exactly one needed |
SqlServerIncrementalSourceFactory.optionRule() .exclusive(...) |
Correct |
| SQL Server CDC zh: three sections ported from en | compared section by section with the en doc | Faithful translation |
Vitess CDC username / password |
VitessSourceOptions, factory rule, VTGate auth usage |
Correct |
TiDB CDC driver |
TiDBCatalogFactory reads JdbcCommonOptions.DRIVER |
Correct |
DB2 CDC split.allow-sampling |
JdbcSourceConfigFactory.fromReadonlyConfig, AbstractJdbcSourceChunkSplitter |
Behavior correct (see Issue 4) |
Sls sink log_group_size |
SlsSinkOptions.LOG_GROUP_SIZE; writer sends one log group per record |
Correct (see Issue 3) |
Milvus zh rate_limit wording, replace zh code span |
compared with the en doc and the example | Correct |
The Redis rule is the one place where scope matters, so here is the exact runtime picture:
Redis source options validated at job start
RedisSourceFactory.optionRule() -> outer options only:
conditional(READ_KEY_ENABLED=true -> SINGLE_FIELD_NAME required) (any data_type)
RedisTableConfigsValidator (tables_configs) -> checks only keys / data_type per entry
JsonKeyValueMerger.setValueInNode (runtime) -> needs the name only for a single (non-object) value
1.2 Compatibility Impact
Fully compatible. Documentation only; no options, defaults, protocols or serialization formats change. Nothing belongs in incompatible-changes.md.
1.3 Performance / Side-Effect Analysis
Not applicable (docs only). No runtime, memory, concurrency or resource effect.
1.4 Error Handling and Logging
Docs are what users rely on to understand failures, so these are the issues I found. All four were reported in my previous review and none has been changed in the new head.
Issue 1: Redis tables_configs table says single_field_name is required whenever read_key_enabled = true, which the code does not enforce there (carryover from my last review, still open)
- Location:
docs/en/connectors/source/Redis.md:86anddocs/zh/connectors/source/Redis.md:82 - Problem description: The edited row sits in the "Table list configuration" table, which documents entries of
tables_configs. The cell reads "yes when read_key_enabled = true". The condition that makes the option required is the top-level.conditional(READ_KEY_ENABLED, true, SINGLE_FIELD_NAME)inRedisSourceFactory.optionRule(). Fortables_configsentries,RedisTableConfigsValidatoronly checkskeysanddata_type, and at runtimeJsonKeyValueMerger.setValueInNodeonly needs the name when the value is a single (non-object) value. So ahashentry withread_key_enabled = trueand nosingle_field_nameis valid. The PR's own new prose (Redis.md:180-184, "Entries oftables_configsare not affected by this validation: theresingle_field_nameis only needed for single-value types") says exactly that, so the table cell and the prose contradict each other, and the table is the first thing readers look at. - Potential risk: Multi-table users add an unnecessary option to hash entries, or conclude the docs are unreliable. This is the same class of mistake the PR sets out to remove.
- Best improvement: Make the per-table cell precise, for example
yes for single-value types (string, list, set, zset) when read_key_enabled = true, and mirror it in the zh table. The outer-level rule is already described correctly in the prose and the### single_field_namesection. - Severity: Medium (blocking: a new inaccuracy in a PR whose purpose is accuracy, and a one-line fix per language)
- Raised by another reviewer: No
Issue 2: Snowflake sink type table is the read direction, and the removed p > 38 row described a real sink behavior (carryover, still open)
- Location:
docs/en/connectors/sink/Snowflake.md:37-56and the zh counterpart - Problem description: The sink doc's "Data Type Mapping" table is headed "Snowflake Data Type to SeaTunnel Data Type", i.e.
SnowflakeTypeConverter.convert. What a sink uses isreconvert(SeaTunnel type to Snowflake type, used for auto-created tables). The PR is right thatconvertnever clamps decimals, butreconvertdoes: whenprecision > MAX_PRECISION (38)it sets precision to 38 and reduces scale by the overflow (SnowflakeTypeConverter.java:228-230). The old row saidDECIMAL(38, 18), which was wrong in the details, but deleting it also removes the only mention of the clamp from the sink doc.reconvertalso maps SeaTunnelBYTEStoGEOMETRY(:308-309), which neither the old nor the new sink table mentions. - Potential risk: A user sizing decimals for a Snowflake sink gets no hint that precision above 38 is rewritten, and may read the table in the wrong direction. Low blast radius, because it only matters for auto-created tables.
- Best improvement: Option A (small): add one sentence under the sink table, for example "When the sink creates a table, SeaTunnel
DECIMAL(p, s)withp > 38is reduced to precision 38 (scale reduced by the same overflow)". Option B (better, fine as a follow-up): replace the sink table with thereconvertdirection. - Severity: Medium
- Raised by another reviewer: No
Issue 3: log_group_size is documented but not declared in SlsSinkFactory.optionRule() (carryover, still open)
- Location:
docs/en/connectors/sink/Sls.md:44,SlsSinkFactory.java:48(.optional(SOURCE, TOPIC)only) - Problem description: The doc is accurate (the writer stores the value but sends one
PutLogsRequestper record), yet the factory rule does not list the option, so doc and rule are out of sync and users may tune an option that does nothing. - Potential risk: Minor user confusion; option prompts built from
optionRulewill not show it. - Best improvement: Leave as is (the "Reserved ... no effect yet" wording is honest), or declare it in the rule in a separate change. Not a blocker.
- Severity: Low
- Raised by another reviewer: No
Issue 4: DB2 CDC split.allow-sampling works but is not declared in Db2IncrementalSourceFactory.optionRule() (carryover, still open)
- Location:
docs/en/connectors/source/DB2-CDC.md:90,Db2IncrementalSourceFactory.java(optional list ends atINVERSE_SAMPLING_RATE) - Problem description: The doc entry is correct; the SQL Server factory lists
SPLIT_ALLOW_SAMPLING, DB2 does not. This is a code-side gap that the doc fix surfaced, not a doc error. - Potential risk: None for readers of the docs; only option-rule listings are incomplete.
- Best improvement: Optional follow-up PR adding
SPLIT_ALLOW_SAMPLINGto the DB2 rule. - Severity: Low
- Raised by another reviewer: No
2. Code Quality Assessment
2.1 Coding Standards
Docs only. Markdown is consistent with the surrounding files. No code comments are involved.
2.2 Test Coverage and Test Stability
No test code changed, and a docs-only change needs none. The author's local check (fence balance, table column counts, relative links) is a reasonable substitute. Stability rating: not applicable (no tests changed).
2.3 Documentation Updates
docs/enanddocs/zhare updated in matched pairs for all paired files; the zh-only items bring zh in line with en.- The only en/zh content problem is the Redis cell in Issue 1, which is wrong in both languages.
3. Architectural Soundness
3.1 Elegance of the Solution
Precise fix. Each change is small and traceable to a source line.
3.2 Maintainability
Good. The PR description names the source class behind every correction, which makes future re-verification quick.
3.3 Extensibility
Nothing to add. Issues 3 and 4 suggest that a small check comparing documented option names with OptionRule entries could catch this drift automatically, but that is out of scope here.
3.4 Historical-Version Compatibility
Fully compatible; no upgrade action.
4. Issue Summary
| # | Issue | Location | Severity |
|---|---|---|---|
| 1 | Redis per-table single_field_name cell contradicts the code and the PR's own prose (carryover, unresolved) |
docs/en/connectors/source/Redis.md:86, docs/zh/connectors/source/Redis.md:82 |
Medium (blocking) |
| 2 | Snowflake sink type table is the read direction; removed row hid the real reconvert clamp (carryover, unresolved) |
docs/en/connectors/sink/Snowflake.md:37-56 |
Medium |
| 3 | log_group_size documented but absent from SlsSinkFactory.optionRule() (carryover, unresolved) |
docs/en/connectors/sink/Sls.md:44 |
Low |
| 4 | split.allow-sampling not declared in Db2IncrementalSourceFactory.optionRule() (carryover, unresolved) |
docs/en/connectors/source/DB2-CDC.md:90 |
Low |
5. Merge Recommendation
Conclusion: Ready to merge after fixes
CI on head 65960bf is green (Build, labeler, Notify test workflow all succeeded). mergeStateStatus is BLOCKED only because a review is required; there are no merge conflicts, and the latest dev was already merged in by the author, so no further sync is needed.
-
Blockers - must be fixed
- Issue 1 (Medium): correct the Redis
tables_configssingle_field_nameRequired cell in both en and zh so it matches the validator and the PR's own prose. The previous round's blocker has not been addressed by the new commit (it only mergeddev).
- Issue 1 (Medium): correct the Redis
-
Recommended fixes - non-blocking
- Issue 2 (Medium): add one sentence on the sink-side decimal clamp, or switch the sink table to the
reconvertdirection in a follow-up. - Issues 3 and 4 (Low): doc-versus-
OptionRulegaps that exist in the code; fine as follow-ups.
- Issue 2 (Medium): add one sentence on the sink-side decimal clamp, or switch the sink table to the
Overall assessment: A careful and useful accuracy pass. Every other correction checks out against the source, including the zh SQL Server port. One small edit to the Redis table cell and this is good to go. There is no better alternative approach to suggest. Happy to re-review as soon as you push an update!
…nowflake sink decimal clamp - The tables_configs single_field_name cell now says it is required only for single-value types (string, list, set, zset) when read_key_enabled = true, matching RedisTableConfigsValidator and the page's own prose. - Note under the Snowflake sink type table that auto-created DECIMAL(p, s) columns with p > 38 are clamped to precision 38 (scale reduced by the overflow) and that BYTES columns are created as GEOMETRY.
|
The blocker and the recommended fix are addressed in 2661d65:
Issues 3 and 4 ( |
DanielLeens
left a comment
There was a problem hiding this comment.
Thanks for fixing the Redis per-table Required cell and adding the Snowflake sink-side conversion note. I re-read all 20 changed files at 2661d659e46b9994cf2e5af9d2f9a22ec16e7d9f and traced their configuration/runtime consumers. The two prior items are closed. Sorry for missing the SQL Server recovery-guidance problem in the preceding review; it was already in that version, and this is an explicitly acknowledged carryover omission rather than a regression in your latest patch.
What Problem Does This PR Solve?
- User pain point: inaccurate type tables, option requirements and missing Chinese explanations lead to wrong configuration and recovery expectations.
- Fix approach: align Snowflake conversion details, Redis validation, TDengine column order and other connector/CDC options across English and Chinese.
- One sentence: document the behavior that the actual factories and runtime consumers implement.
For example, read_key_enabled=true in legacy single-table Redis validation requires single_field_name even for a hash, while a tables_configs entry needs it when mapping a key-enabled single value. The updated prose/table now distinguish those cases.
1. Code Change Review
1.1 Core Logic Analysis
The complete diff is Markdown-only. Representative before/after corrections:
Snowflake TIMESTAMP_LTZ / TIMESTAMP_TZ:
before -> TIMESTAMP
after -> TIMESTAMP_TZ (OFFSET_DATE_TIME_TYPE)
Snowflake GEOGRAPHY / GEOMETRY:
before -> bytes-or-string according to URL
after -> SeaTunnel STRING; representation still depends on JDBC settings
TDengine read_columns:
before -> list determines output order
after -> membership filter; output follows DESC metadata order
Actual paths checked:
Snowflake JDBC metadata -> SnowflakeTypeConverter.convert:156-180
GEOGRAPHY/GEOMETRY -> STRING; BINARY -> BYTES; LTZ/TZ -> offset datetime
Sink catalog auto-create -> SnowflakeTypeConverter.reconvert:228-230,307-309
DECIMAL overflow -> precision 38, scale max(0, scale-overflow); BYTES -> GEOMETRY
RedisSourceFactory.optionRule:107-110 -> root key-enabled conditional requirement
tables_configs -> RedisTableConfigsValidator -> table config
single-value row conversion -> JsonKeyValueMerger:76-82 -> needs value field name
TDengineSource:129-146 -> DESC result iteration -> readColumns.contains filter
-> selected columns retain metadata order, not input-list order
DB2 source config -> JdbcSourceConfigFactory:282 -> sampleShardingAllow
-> AbstractJdbcSourceChunkSplitter:170-244
-> arithmetic evenly-sized path OR sampling/iterative uneven path
SLS factory/config -> writer reads logGroupSize at :67
-> write:74-81 sends each serialized row's PutLogsRequest; size field unused
MilvusSourceReader:93-106 -> server collection.queryRate.max.qps property
TiDBSourceFactory -> TiDBCatalogFactory.createCatalog -> configured JDBC driver
VitessSourceFactory optional credentials -> VitessSourceConfig:190-201 properties
SQL Server exclusive table-name/pattern rule -> snapshot/incremental selection
-> fetch-task context -> HeartbeatFactory with source dataConnection
-> action query; source CDC cleanup/retention remains independent
ReplaceTransform -> configured pattern/replacement applied to selected fields
Key findings:
- Redis's previous table/prose contradiction is fixed; the Snowflake sink note now describes the reverse conversion rather than hiding it in a read-direction table.
- Snowflake timezone/geospatial mappings, TDengine metadata ordering, Vitess credentials and the Milvus collection-QPS distinction match the inspected paths.
- The SLS option is read but has no batching effect; factory-rule limitations should remain explicit rather than claiming universal validation support.
- Disabling DB2 sampling does not disable the separate arithmetic/even-distribution branch (Issue 2).
- The newly copied SQL Server heartbeat section gives an incorrect slot/retention explanation (Issue 1). Translation parity alone does not establish its correctness.
1.2 Compatibility Impact
Fully compatible at the implementation/API level. No runtime API/SPI, option key/default, protocol, serialization or historical behavior changes; no incompatible-changes entry or migration is needed. Users should follow corrected type and validation descriptions for the existing implementation.
1.3 Performance / Side-Effect Analysis
No CPU, memory, GC, network, locking, concurrency, retry, idempotency or resource-release code changes. Existing operational effects matter to the wording: Milvus rate limiting changes a server-side collection property shared by clients; DB2 sampling changes split-planning queries; heartbeat actions write on the source. These are existing effects, not new behavior caused by this PR. The SLS size option currently does not bound requests across multiple rows.
1.4 Error Handling and Logging
The prior Redis blocker is resolved, but I cannot retain the previous blanket technical clearance. Complete findings for this head:
Issue 1: Correct the SQL Server heartbeat/retention explanation in both languages.
- Location:
docs/zh/connectors/source/SqlServer-CDC.md:321,:341-342, and the matching English heartbeat section. - Description: SQL Server CDC has no PostgreSQL-style replication slot to keep active. SeaTunnel wires
HeartbeatFactorytoDefaultHeartbeatConnectionProvider(dataConnection)inSqlServerSourceFetchTaskContext.java:149-154, so the action uses the source database. It does not pin the consumer's required LSN range or override SQL Server CDC cleanup. The example table prerequisite therefore belongs on the source, rather than a downstream target. I checked the actual SeaTunnel wiring; I am not asserting that the query is unsupported based on a generic Debezium version comparison. - Risk: users can mistake periodic writes for protection against change-table expiry and later be unable to resume a checkpoint after lag/outage.
- Best improvement: remove the slot claim, state that heartbeat does not replace appropriate CDC retention and lag monitoring, and identify the source-side table/permissions prerequisite. Correct English and Chinese together. Microsoft documents retention-based cleanup.
- Severity: High, blocking documentation correctness.
- Raised by others: No; no independent technical reviewer findings were present. This is the carryover omission acknowledged above.
Issue 2: Scope the DB2 sampling-disabled description to the branch it controls.
- Location:
docs/en/connectors/source/DB2-CDC.md:90, with the equivalent Chinese option row. - Description: the new row says false always chooses iterative/uniform sharding. In
AbstractJdbcSourceChunkSplitter.java:170-229, an eligible evenly distributed column still takessplitEvenlySizedChunkswhen sampling is false. The flag prevents sampling; it does not force every input through iterative queries. The option's own description is broader than the implementation as well, so copying it is insufficient. - Risk: users can choose the flag expecting a different planning algorithm or load profile.
- Best improvement: say that false disables sampling, while arithmetic splitting can still apply to eligible evenly distributed keys; iterative splitting is the non-sampling fallback for the other path.
- Severity: Medium, non-blocking wording correction.
- Raised by others: No; this also predates the latest Redis fix.
Issue 3: Make the existing factory-rule limitations visible for the newly documented options.
- Location:
docs/en/connectors/sink/Sls.md:44,docs/en/connectors/source/DB2-CDC.md:90, and their Chinese counterparts. - Description: the known earlier points remain:
SlsSinkFactory.optionRule()omitsLOG_GROUP_SIZE, and the DB2 factory's rule omitsSPLIT_ALLOW_SAMPLING. Their runtime reads exist, but strict unknown-key validation (SeaTunnelConfValidateCommand.java:325/ starter validation) uses the declared rule and can reject the documented keys. Ordinary option-rule required/conditional validation and strict unknown-key validation are separate paths; I am not claiming every engine submission fails. - Risk: users can encounter a validation/runtime-support mismatch. The SLS row already correctly says the batching value has no effect.
- Best improvement: briefly document the current validation limitation or track the factory declarations as focused follow-ups. No unrelated refactor is needed in this documentation patch.
- Severity: Low, non-blocking; carries forward the two previously identified code-side gaps.
- Raised by others: No; the author explicitly acknowledged deferring these earlier Daniel findings.
2. Code Quality Assessment
2.1 Coding Standards
Focused bilingual Markdown edits; no core methods or production fields added. The Replace whitespace correction matches the configured space-to-underscore example. The runtime-versus-validation distinction should remain clear for reserved/incompletely declared options.
2.2 Test Coverage and Stability
No UT/E2E code changes; a test-stability rating is not applicable. I did not run local builds, tests, sites, databases or connector jobs. The complete diff, factories, converters, split selection, row mapping, heartbeat wiring and a clean git diff --check were inspected statically. External services and all JDBC representation variants were not executed.
2.3 Documentation Updates
The Redis/Snowflake fixes are accepted in both languages. Correct Issue 1 in English and Chinese together; Issues 2-3 improve precision/operational expectations. Existing runtime behavior does not need a migration guide.
3. Architectural Soundness
3.1 Solution Quality
A precise documentation correction; implementation redesign is unnecessary.
3.2 Maintainability
Source-backed type/configuration tables help, provided translated operational guarantees are checked against the actual runtime and database behavior.
3.3 Extensibility
Existing option-table and example structure is sufficient. Factory completeness checks would help future drift, but are a separate scoped improvement.
3.4 Historical-Version Compatibility
Fully compatible; no persisted data/state or protocol format changes.
4. Issue Summary
| # | Issue | Location | Severity |
|---|---|---|---|
| 1 | SQL Server slot/retention guidance is unsafe | docs/zh/connectors/source/SqlServer-CDC.md:321 |
High |
| 2 | Sampling false does not force every DB2 split to iterative planning | docs/en/connectors/source/DB2-CDC.md:90 |
Medium |
| 3 | Runtime option reads and strict factory validation still differ | docs/en/connectors/sink/Sls.md:44; DB2 option row |
Low |
5. Merge Recommendation
Conclusion: Ready to merge after fixes
- Blockers that must be fixed: Issue 1. My earlier Redis blocker is closed, but this acknowledged earlier omission means the source/documentation conclusion is not CI-only. Final required checks and write-capable maintainer approval are still required.
- Suggested improvements, non-blocking: Issue 2's narrower algorithm description and Issue 3's explicit validation limitation/follow-up.
Current recorded CI: Notify test workflow: SUCCESS, labeler: SUCCESS, Build: SUCCESS. The current dev comparison is diverged, ahead 3 / behind 8, mergeable state blocked. Branch drift is recorded separately; there is no unrelated failed current-head check establishing a need for another sync-first comment. Green checks do not clear Issue 1 or replace the repository approval gate.
There are no independent maintainer approvals/change requests to endorse or dispute. The latest technical conclusion is the one above; a historical changes-requested entry and Daniel's READ permission should be tracked separately from any future maintainer approval. Overall the latest two fixes are good. A short bilingual heartbeat/retention correction is the smallest remaining blocker fix; no unrelated SQL Server or sampling implementation change is requested here.
# Conflicts: # docs/zh/transforms/replace.md
DanielLeens
left a comment
There was a problem hiding this comment.
Thanks again, @zhangshenghang. I re-read the complete current diff (19 files, en and zh) on head 8adbfb48d5dfcaaf9cb9c38645ac6e551e7f23c5. The only new commit since my last review (2661d659) is a merge of dev; the 19 documentation files are byte-for-byte unchanged, so the open items from my previous review are all still present. I am listing them again here in one place. Nothing was executed locally; this is source tracing only.
What Problem Does This PR Solve?
- User pain point: Connector and CDC docs describe type mappings, required flags, option names and defaults that do not match the code (TDengine column order, Redis
single_field_name, Snowflake type mapping, SQL Server CDC options, several undocumented options, a zh/en drift). - Fix approach: 19 doc files (en/zh pairs, a zh-only parity port for SQL Server CDC, and small zh-only fixes) are corrected against the source.
- One-sentence summary: A docs-only accuracy pass that is mostly correct and where my earlier Redis and Snowflake items are fixed, with one remaining operational statement that is wrong for SQL Server.
1. Code Change Review
1.1 Core Logic Analysis
Docs only. Re-verified as correct on this head: TDengine output order follows desc metadata (readColumns is a filter only), Snowflake read-side mappings (SnowflakeTypeConverter.convert) and the new sink-side clamp/GEOMETRY note (reconvert), Redis root vs tables_configs single_field_name wording (RedisSourceFactory.optionRule, RedisTableConfigsValidator), SQL Server CDC table-names / table-pattern exclusivity, Vitess and TiDB options, Milvus collection QPS wording.
Runtime path behind Issues 1 and 2:
SqlServerSourceFetchTaskContext (lines 149-154)
-> new HeartbeatFactory<>(..., new DefaultHeartbeatConnectionProvider(dataConnection), null)
-> heartbeat.action.query executes on the source database connection
(no replication slot exists in SQL Server CDC; change-table cleanup is retention based)
AbstractJdbcSourceChunkSplitter.splitTableIntoChunks (about lines 165-235)
-> evenly distributed split column -> splitEvenlySizedChunks (also taken when sampling is false)
-> sampling only when distributionFactor > 1.0 or uneven AND sampleShardingAllow
1.2 Compatibility Impact
Fully compatible (documentation only; no option, default, API, protocol or state change).
1.3 Performance / Side-Effect Analysis
No code impact. Operational wording matters: a heartbeat query writes to the source, and DB2 sampling changes split-planning queries.
1.4 Error Handling and Logging
Issue 1 (blocking): SQL Server heartbeat section claims it keeps a CDC "slot" alive and protects the LSN window
- Location:
docs/zh/connectors/source/SqlServer-CDC.mdheartbeat section (the new zh port, about lines 321 and 341-342) and the matching English sectiondocs/en/connectors/source/SqlServer-CDC.md:324-347. - Problem: SQL Server CDC has no replication slot. The heartbeat query runs on the source connection (
SqlServerSourceFetchTaskContext:149-154); it neither pins the LSN range a consumer needs nor overrides change-table cleanup, which is retention based. The text also says the table must exist "on the target database"; it is the source database. - Risk: Users may treat periodic writes as protection against change-table expiry and later be unable to resume from a checkpoint after a long lag or outage. This PR copies the English wording into a new Chinese section, so it spreads the statement.
- Best improvement: Remove the slot claim, say that the heartbeat does not replace appropriate CDC retention and lag monitoring, and name the source database as the place where the heartbeat table and permissions must exist. Fix en and zh together.
- Severity: High (blocking documentation correctness). Raised by another reviewer: No. Carryover from my previous review, not a regression.
Issue 2 (recommended): DB2 split.allow-sampling = false description is too absolute
- Location:
docs/en/connectors/source/DB2-CDC.md:90and the zh row. - Problem: The row says false "always falls back to uniform sharding (iterative queries)". In
AbstractJdbcSourceChunkSplitter, an evenly distributed column still takessplitEvenlySizedChunks(arithmetic splitting) when sampling is false; the flag only prevents sampling. - Risk: Users expect a different planning algorithm or load profile than they get.
- Best improvement: Say that false disables sampling, arithmetic splitting still applies to eligible evenly distributed keys, and iterative splitting is the non-sampling fallback for the rest.
- Severity: Medium (non-blocking). Raised by another reviewer: No.
Issue 3 (recommended): option rules do not declare the newly documented options
- Location:
docs/en/connectors/sink/Sls.md:44(log_group_size),docs/en/connectors/source/DB2-CDC.md:90, and zh rows. - Problem:
SlsSinkFactory.optionRule()omitsLOG_GROUP_SIZEand the DB2 factory rule omitssplit.allow-sampling. The runtime reads them, but strict unknown-key validation uses the declared rule and can reject the documented keys. - Risk: A documented option can be flagged by validation tooling. The SLS row already correctly says the value has no effect.
- Best improvement: Either note the validation limitation in the docs or track the factory declarations as a focused follow-up.
- Severity: Low (non-blocking). Raised by another reviewer: No.
2. Code Quality Assessment
2.1 Code conventions
Focused bilingual Markdown edits; no production code or core methods added.
2.2 Test coverage and stability
No tests changed; stability rating not applicable.
2.3 Documentation
en and zh are in sync for the Redis, Snowflake, TDengine and CDC changes. Issue 1 must be fixed in both languages.
3. Architectural Soundness
3.1 Solution quality
Precise documentation correction; no implementation redesign needed.
3.2 Maintainability
Source-backed tables help, provided translated operational guarantees are checked against runtime behavior.
3.3 Extensibility
Not applicable; factory option-completeness checks would be a separate improvement.
3.4 Historical compatibility
No persisted data, state or protocol changes.
4. Issue Summary
| No. | Issue | Location | Severity |
|---|---|---|---|
| 1 | SQL Server heartbeat described as slot keep-alive / LSN protection, "target database" | SqlServer-CDC.md (en and zh) heartbeat section |
High, blocking |
| 2 | DB2 sampling=false said to always use iterative sharding | DB2-CDC.md:90 (en), zh row |
Medium |
| 3 | log_group_size and split.allow-sampling not in factory option rules |
Sls.md:44, DB2-CDC.md:90 |
Low |
5. Merge Recommendation
Conclusion: Ready to merge after fixes
- Blockers: Issue 1 (a short bilingual correction).
- Recommended: Issues 2 and 3.
- CI: Current-head Build is green (
pass, 45m20s). The branch is 1 commit behinddevwith no conflict; CI is passing, so no sync is requested. - Overall: The Redis and Snowflake fixes are good and accepted. Once the SQL Server heartbeat wording is corrected in en and zh, I expect to approve.
…ut-format note lost in merge resolution
DanielLeens
left a comment
There was a problem hiding this comment.
Thanks for keeping this batch up to date, @zhangshenghang. This is a re-review of the current head 8825af7e. Since my last review (8adbfb48) there are two new commits:
b342da89mergesorigin/dev.8825af7erestores the Snowflake DECIMAL-overflow row and the geospatial output-format note.
I compared the PR's net diff before and after the merge line by line. The only differences are in the four Snowflake pages, and the reason is that dev's #12459 had already landed most of this PR's Snowflake type-table fixes. The other 15 files are byte-for-byte unchanged, so the open items from my previous review are still present.
What Problem Does This PR Solve?
It corrects connector and CDC docs (EN/ZH) whose type mappings, required flags and option descriptions do not match the code: TDengine column order, Redis single_field_name, Snowflake mappings and the sink clamp, SQL Server CDC table-names/table-pattern, newly documented options for SLS/DB2/TiDB/Vitess, Milvus QPS wording, and a ZH port of the SQL Server CDC sections. It is documentation only.
1 Code Change Review
1.1 What changed in 8825af7e (verified correct)
- Sink DECIMAL row (
docs/en/connectors/sink/Snowflake.md:46,docs/zh/connectors/sink/Snowflake.md:46): this re-adds dev's rowDECIMAL(p, s) (p > 38) -> DECIMAL(38, s - (p - 38)) (minimum scale 0), which the merge resolution had dropped. With it back, the PR no longer deletes dev content. The formula matchesSnowflakeTypeConverter.reconvert(scale = max(0, scale - (precision - 38)),precision = 38, lines 228-230). - Source geospatial note (
docs/en/connectors/source/Snowflake.md:153, ZH:153): "always mapped toSTRING; the text representation depends on JDBC URL parameters such asGEOGRAPHY_OUTPUT_FORMAT". This matchesconvert(lines 156-159), whereGEOGRAPHY/GEOMETRYmap toSTRING_TYPE. - The sink prose note (
sink/Snowflake.md:57, EN/ZH) and thegenerate_sink_sqlrow also survived the merge unchanged.
Optional (non-blocking, from dev, not from this PR): the sink table is headed "Snowflake Data Type -> SeaTunnel Data Type". Its p > 38 row really describes the write direction, because Snowflake itself cannot hold p > 38. Your prose note at :57 already states the correct direction, so the row now repeats it. You could drop the row in a follow-up, or leave it. It does not block this PR.
1.2 Status of previous points
| # | Previous point | Status at 8825af7e |
|---|---|---|
Redis single_field_name cell / Snowflake sink clamp |
Fixed earlier | Still correct after the merge |
| 1 | SQL Server heartbeat described as "keep the CDC slot active", plus "target database" | Still open |
| 2 | DB2 split.allow-sampling = false described as "always" iterative |
Still open (non-blocking) |
| 3 | log_group_size / split.allow-sampling missing from factory option rules |
Deferred by you as a code-side follow-up (non-blocking, agreed) |
1.3 Findings
Issue 1: The SQL Server heartbeat section still describes a "CDC slot" and the wrong database (carryover, blocking)
- Location:
docs/zh/connectors/source/SqlServer-CDC.md:321and:341-342(the ZH section this PR adds). The same wording is in the existing EN section,docs/en/connectors/source/SqlServer-CDC.md:326and:346-347. - Problem: SQL Server CDC has no replication slot. SeaTunnel builds the heartbeat with
new HeartbeatFactory<>(..., new DefaultHeartbeatConnectionProvider(dataConnection), ...)(SqlServerSourceFetchTaskContext.java:149-154). Soheartbeat.action.queryruns on the source connection. It does not pin the LSN range a consumer needs, and it does not override change-table cleanup, which is retention based. The text also says the heartbeat table must exist "on the target database" (and the ZH text says the same), but it must be the source database. - Risk: Users may treat periodic heartbeat writes as protection against change-table expiry. Then, after a long lag or outage, they cannot resume from a checkpoint. This PR copies the statement into a new Chinese section, which spreads it further.
- Best improvement: In both languages:
- Describe the heartbeat as a way to keep offsets and events flowing during idle periods, not as a slot keep-alive.
- Say that it does not replace a suitable CDC retention setting and lag monitoring.
- Name the source database as the place where the heartbeat table and INSERT permission must exist.
- Severity: High (blocking documentation correctness)
- Raised by another reviewer: No (carried over from my previous two reviews)
Issue 2: The DB2 sampling-disabled description is too absolute (non-blocking)
- Location:
docs/en/connectors/source/DB2-CDC.md:90,docs/zh/connectors/source/DB2-CDC.md:89 - Problem: The row says that
false"always falls back to uniform sharding (iterative queries)". InAbstractJdbcSourceChunkSplitter.java:170-177, an evenly distributed split column (distribution factor between the lower and upper bounds) still takes the arithmeticsplitEvenlySizedChunkspath, whateversampleShardingAllowis set to. The flag only prevents sampling on the uneven path. - Risk: Users may expect a different planning algorithm or query load than they get.
- Best improvement: For example: "When
false, sample-based sharding is disabled: evenly distributed keys still use arithmetic splitting, and unevenly distributed keys fall back to iterative queries." - Severity: Medium, non-blocking
- Raised by another reviewer: No
Issue 3: unchanged and deferred (factory optionRule() gaps for LOG_GROUP_SIZE and split.allow-sampling). Non-blocking for a docs PR.
1.4 Compatibility / side effects
Docs only. Fully compatible. No option, default, API, protocol or state change. The merge did not remove any dev content: every removed line in the net diff is one of this PR's reviewed corrections (Redis, SQL Server option rows, TDengine, Milvus).
2 Quality
- 2.1 Standards: Markdown only.
- 2.2 Tests and stability: Not applicable (no test code). Static source cross-check only. Nothing was executed.
- 2.3 Docs EN/ZH parity: The Snowflake restoration is applied identically in EN and ZH. Fix Issue 1 in both languages together.
3 Architecture
Precise documentation corrections. No implementation change is needed.
4 Issue Table
| No. | Finding | Location | Severity | Status |
|---|---|---|---|---|
| 1 | SQL Server heartbeat: "CDC slot" and "target database" | ZH SqlServer-CDC.md:321, :341-342; EN :326, :346-347 |
High, blocking | Still open |
| 2 | DB2 split.allow-sampling = false "always" iterative |
EN DB2-CDC.md:90, ZH :89 |
Medium | Still open, non-blocking |
| 3 | Option rules omit log_group_size / split.allow-sampling |
Sls.md:44, DB2-CDC.md:90 |
Low | Deferred follow-up |
| 4 | Dev's sink p > 38 row sits in a read-direction table |
sink/Snowflake.md:46 (EN/ZH) |
Cosmetic | Optional |
| 5 | No CI run on the current head | apache Build check |
CI | Open |
5 Merge Recommendation
Ready to merge after fixes
- Blocking (non-CI): Issue 1, a short bilingual correction of the heartbeat paragraph.
- Non-blocking: Issue 2 (recommended), Issue 3 (follow-up), Issue 4 (optional).
- CI: the apache-side
Buildcheck for8825af7ereports "Workflow run detection failed": https://github.com/apache/seatunnel/runs/128372081640. Your fork has noBuildrun forb342da89or8825af7e. The last green run was on8adbfb48. I can see no run on any branch of your fork since 2026-11-06 22:36 UTC, which also affects #12986. Please check that GitHub Actions is still enabled for the fork, with no billing or spending-limit hold. Then start the Build workflow by hand ondocs-fix-batch-20261015: https://github.com/zhangshenghang/seatunnel/actions/workflows/build_main.yml. The branch is 2 commits behinddevwith no conflict, so no sync is needed.
The Snowflake restoration is correct, and the rest of the batch is in good shape. Once the heartbeat wording is fixed in EN and ZH and Build is green, I expect to approve. Thanks again for the careful source-checking.
…ling descriptions Per review on apache#12813: the SqlServer-CDC heartbeat section described a nonexistent CDC replication slot and pointed to the target database, while the heartbeat query actually runs on the source connection and does not replace change-table retention. The DB2-CDC split.allow-sampling description claimed iterative queries are always used when sampling is disabled, but evenly distributed keys still take the arithmetic splitting path. Co-authored-by: multica-agent <github@multica.ai>
DanielLeens
left a comment
There was a problem hiding this comment.
Thanks for the follow-up, @zhangshenghang. This is a full re-review of the current head ef10966198d2e39e14796b81edb06fa571415274. Since my last review (8825af7e) there are two new commits: a merge of dev and ef109661, which rewrites the SQL Server CDC heartbeat section and the DB2 split.allow-sampling row in both EN and ZH. I compared the PR's net diff before and after the merge file by file: the file set is the same 19 docs, and only the four files touched by ef109661 changed. Everything else is byte-for-byte what I had already verified. This is static source tracing only; nothing was executed locally.
What Problem Does This PR Solve?
- User pain point: several connector and CDC docs (EN/ZH) describe type mappings, required flags, option names and defaults that do not match the code. Examples are TDengine column order, Redis
single_field_name, the Snowflake mappings and sink clamp, SQL Server CDC options and heartbeat guidance, undocumented SLS/DB2/TiDB/Vitess options, and Milvus QPS wording. - Fix approach: small, source-backed Markdown corrections in matched EN/ZH pairs, plus a ZH port of the SQL Server CDC sections that previously existed only in EN.
- One-sentence summary: a documentation accuracy pass that now matches the code everywhere I checked, including the two items still open in my previous review.
1. Code Change Review
1.1 Core Logic Analysis
SQL Server CDC heartbeat (docs/en/connectors/source/SqlServer-CDC.md:324-352, docs/zh/connectors/source/SqlServer-CDC.md:319-344)
before: "keep the CDC slot active" ... "table must exist on the target database"
after : keeps offsets and events flowing in idle periods; SQL Server CDC has no slot;
does not pin the LSN range or replace change-table retention and lag monitoring;
query runs on the source connection, so table + INSERT permission live on the source database
DB2 CDC split.allow-sampling (docs/en/connectors/source/DB2-CDC.md:90, docs/zh/connectors/source/DB2-CDC.md:89)
before: false -> "always" iterative queries
after : false -> sampling disabled; evenly distributed keys still use arithmetic splitting,
unevenly distributed keys fall back to iterative queries
Key findings:
- The heartbeat wording now matches the code.
SqlServerSourceFetchTaskContext.java:149-154buildsnew HeartbeatFactory<>(..., new DefaultHeartbeatConnectionProvider(dataConnection), null), soheartbeat.action.queryruns on the source JDBC connection. The "slot" and "target database" statements are gone in both languages. - The DB2 row now matches
AbstractJdbcSourceChunkSplitter.splitTableIntoChunks, whichDb2ChunkSplitterinherits without overriding. On the evenly distributed branch (:170-230), sampling is attempted only whendistributionFactor > 1.0 && sampleShardingAllow; otherwisesplitEvenlySizedChunksruns (:227-229). On the uneven branch (:233), sampling requiressampleShardingAllow; otherwisesplitUnevenlySizedChunksruns (:268-271). - The EN and ZH texts say the same thing, sentence for sentence.
- The rest of the batch is unchanged since my last verification: TDengine
descorder, Redis root vstables_configsrules, the Snowflakeconvert/reconvertnotes, SQL Serverconnect.timeout.ms/server-time-zone/exclusive table options, Vitess/TiDB/SLS options, and Milvus wording.
Runtime path behind the heartbeat text:
SqlServer-CDC stream split
-> SqlServerSourceFetchTaskContext.configure (149-154)
HeartbeatFactory(connectorConfig, ..., DefaultHeartbeatConnectionProvider(dataConnection))
-> heartbeat.interval.ms tick -> heartbeat.action.query executed on the SOURCE connection
-> heartbeat record advances offsets during idle periods
(change-table cleanup stays governed by SQL Server CDC retention, independent of the heartbeat)
1.2 Compatibility Impact
Fully compatible. Documentation only. No option, default, API, protocol, serialization or checkpoint state changes.
1.3 Performance / Side-Effect Analysis
Not applicable to runtime. The new text correctly warns users that the heartbeat writes to the source database and is not a retention safeguard.
1.4 Error Handling and Logging
No blocking issues remain.
Issue 1: "when there is no activity" in the closing heartbeat sentence is slightly loose (optional)
- Location:
docs/en/connectors/source/SqlServer-CDC.md:351-352,docs/zh/connectors/source/SqlServer-CDC.md:342-344 - Problem description: The sentence before it correctly says cleanup is retention based. The trailing "SQL Server may recycle the LSN window when there is no activity" still hints that idleness is the trigger. In fact cleanup removes entries older than the retention period whether or not there is activity, and what breaks resume is the job lagging past that period.
- Potential risk: Minimal. The surrounding sentences already give the right guidance.
- Best improvement: Optional rewording, for example "if the job falls behind by more than the retention period, the LSN range it needs may be cleaned up, which can break resumable streaming jobs".
- Severity: Low (non-blocking)
- Raised by another reviewer: No
Issue 2: option rules do not declare log_group_size / split.allow-sampling (carryover, deferred)
- Location:
SlsSinkFactory.optionRule(),Db2IncrementalSourceFactory.optionRule() - Problem description: As agreed earlier, this is a code-side follow-up, not a docs error.
- Severity: Low (non-blocking)
- Raised by another reviewer: No
2. Code Quality Assessment
2.1 Coding Standards
Markdown only. It is consistent with the surrounding pages, and no code comments are involved.
2.2 Test Coverage and Test Stability
No test code changed, and none is needed. Test stability rating: not applicable.
2.3 Documentation Updates
EN and ZH are updated together for every changed file, and the ZH section heading now matches the content ("Heartbeat action" instead of "keep-alive").
3. Architectural Soundness
3.1 Elegance of the Solution
Precise, source-traceable corrections.
3.2 Maintainability
Good. The commit message explains the reason for each correction.
3.3 Extensibility
Not applicable.
3.4 Historical-Version Compatibility
No persisted data, state or protocol change.
4. Issue Summary
| No. | Issue | Location | Severity |
|---|---|---|---|
| 1 | Closing heartbeat sentence still ties LSN cleanup to "no activity" | SqlServer-CDC.md EN :351-352, ZH :342-344 |
Low (optional) |
| 2 | log_group_size / split.allow-sampling missing from factory option rules |
SlsSinkFactory, Db2IncrementalSourceFactory |
Low (deferred follow-up) |
5. Merge Recommendation
Conclusion: Ready to merge
- Blockers: none. The SQL Server heartbeat blocker from my previous reviews is resolved in both languages, and so is the DB2 sampling wording.
- Recommended fixes (non-blocking): Issue 1 (optional wording) and Issue 2 (code-side follow-up).
- Overall assessment: A careful batch. Every changed claim checks out against the source. Thanks for sticking with it through several rounds.
- CI / branch state: the fork Build for this head is green: https://github.com/zhangshenghang/seatunnel/actions/runs/42947610725 (apache-side check: https://github.com/apache/seatunnel/runs/130284228873). The branch is 0 commits behind
devwith no conflicts. GitHub showsblockedonly because the required review is still pending.
|
Thanks for the +1, @davidzollo. My earlier documentation clearance remains unchanged and both current-head Builds are successful. The heartbeat wording and factory-option notes remain optional as recorded; the remaining effective repository approval is for a write-capable maintainer. |
|
A merge-gate correction for unchanged head |
DanielLeens
left a comment
There was a problem hiding this comment.
Thanks for the update! I re-reviewed the complete current diff and relevant source. The earlier blockers are closed, the conflict is resolved, and both current-head Builds are successful. No source blocker remains.
What problem does this PR solve?
User pain: reference pages misstate options, mappings and CDC heartbeat behavior.
Fix: correct the bilingual text without changing runtime.
In one sentence: document existing connector behavior accurately. Example: a SQL Server heartbeat executes on the source; it does not keep a replication slot alive or pin the CDC retention window.
1. Code changes
1.1 Core logic
Complete runtime path:
Config -> connector OptionRule -> source/sink runtime
SQL Server -> exclusive table selection -> snapshot splits -> incremental LSN reading; heartbeat uses source connection
Redis -> root conditional versus independent tables_configs -> value/object merger
Snowflake -> SnowflakeTypeConverter.convert (read) / reconvert (auto-create)
TDengineSource.readStableMetadata (:125-147) -> DESC order -> read_columns membership filter -> leading subtable_name
DB2 -> JdbcSourceConfigFactory -> arithmetic / sampling / iterative branches
SLS -> PutLogs per serialized row; log_group_size read but unused
Vitess optional credentials -> source config; TiDB driver -> JDBC metadata
Key findings and correctness:
- All 19 changed files were reviewed. The SQL Server slot/retention blocker and DB2 always-iterative wording are resolved.
- TDengine iterates DESC order and filters membership, matching the revised description. Snowflake reconvert clamps precision to 38 with a zero scale floor and currently maps BYTES to GEOMETRY; those are existing behavior.
- Redis now distinguishes root validation from nested entries. SQL Server table-selection alternatives are exclusive; heartbeat permissions and retention are separate.
- The already deferred SLS/DB2 factory-option metadata gaps remain optional code follow-ups.
- Both current-head Builds are successful and the former content conflict is resolved.
Before:
| access_key_secret | String | Yes | - | Alibaba Cloud AccessKey secret. Must not be empty or whitespace-only. |
| source | String | No | `SeaTunnel-Source` | Source tag written to SLS log groups. |
| topic | String | No | `SeaTunnel-Topic` | Topic tag written to SLS log groups. |
## Notes
After:
| access_key_secret | String | Yes | - | Alibaba Cloud AccessKey secret. Must not be empty or whitespace-only. |
| source | String | No | `SeaTunnel-Source` | Source tag written to SLS log groups. |
| topic | String | No | `SeaTunnel-Topic` | Topic tag written to SLS log groups. |
| log_group_size | Int | No | 100 | SLS log group write size. Reserved: the connector reads this option, but the current implementation sends one log group per record, so it has no effect yet. |
## Notes
1.2 Compatibility
Fully compatible: documentation only; no API/configuration/default/protocol/checkpoint or historical behavior change. No migration.
1.3 Performance and side effects
No runtime CPU/memory/GC/network/lock/retry/idempotency/resource change. The SQL Server correction avoids treating heartbeat as a retention guarantee.
1.4 Errors, logging, and findings
No new source-level blocker found. Exceptions must still reach the existing job failure path; this review does not substitute for current-head CI.
I agree with @davidzollo's earlier +1 on the documentation direction. That historical review is DISMISSED, so it is not effective approval for this new head; a write-capable maintainer still owns that gate.
2. Code quality
2.1 Conventions
Reviewed all changed files for license, imports, naming, core-method and state-field comments. No additional convention blocker found.
2.2 Test coverage and stability
Stability rating: Stable. No test code changes; stability rating not applicable. Read the full bilingual diff and converter/factory/writer/metadata paths; git diff --check passed. No local execution.
2.3 Documentation
EN/ZH agree on the corrected claims. The Chinese-only Milvus correction aligns with existing query-quota guidance. Plugin identities and registrations are unchanged.
3. Architecture
3.1 Change location
The root cause addressed is inaccurate public guidance. The reference pages are the best/smallest correction point. Changing runtime to fit incorrect documentation would create unrelated risk; factory metadata is a separate follow-up.
3.2 Maintainability
Keep the behavior, lifecycle ownership, and failure contract together. The root cause addressed is inaccurate public guidance. The reference pages are the best/smallest correction point. Changing runtime to fit incorrect documentation would create unrelated risk; factory metadata is a separate follow-up.
3.3 Extensibility
Prefer the existing component boundary and tests over unrelated shared abstractions.
3.4 Upgrade impact
Fully compatible: documentation only; no API/configuration/default/protocol/checkpoint or historical behavior change. No migration.
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 |
|---|---|---|---|
| - | No new source blocker found | - | - |
5. Merge recommendation
Can merge once the recorded CI and repository gates are satisfied
Blocking items: No source blocker. Current-head CI and write-capable maintainer review remain independent requirements.
Non-blocking suggestions: None beyond the validation limits above.
Overall: the reviewed source path is coherent; no runtime acceptance is claimed beyond the actual CI result. Daniel has READ permission, so this COMMENT cannot dismiss historical requested changes or satisfy a write-capable maintainer approval gate.
CI and repository state: Label PRs when reviewed: SUCCESS; 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 b0a940b8f8c56dbb1bacf286760b5d77eb2634f6 against merge base c8e7a262897f341361094f158ffd4f60ae466b80. git diff --check passed. I did not build, run tests, or execute SeaTunnel locally.
Review time: 2026-11-21T06:43:20.712868-05:00
Local evidence: git fetch obtained head b0a940b8f8c56dbb1bacf286760b5d77eb2634f6; git merge-base returned c8e7a262897f341361094f158ffd4f60ae466b80; git diff --stat reports 19 files changed, 76 insertions(+), 41 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.
… not idle periods - The closing sentence of the heartbeat section said SQL Server may recycle the LSN window 'when there is no activity'. Change-table cleanup is retention based and runs regardless of activity; what breaks resume is a job lagging past the retention period. - Reword the sentence in en and zh to say the LSN range a job needs may already have been cleaned up once the job falls behind by more than the retention period.
Purpose of this PR
This PR fixes a batch of real documentation inaccuracies found by comparing connector docs against the actual source code. All findings were verified against the code before editing; nothing cosmetic was changed for its own sake.
Issues found and changes made
TDengine source (
docs/{en,zh}/connectors/source/TDengine.md)read_columnsdecides the output field order. In factTDengineSourceConfigcollectsread_columnsinto aSet(order discarded) andTDengineSourcebuilds the schema fromdesc <db>.<stable>metadata order, usingread_columnsonly as a filter. Reworded both docs: the output order always follows the super table definition order (normal columns first, then TAGS).Redis source (
docs/{en,zh}/connectors/source/Redis.md)single_field_namerequirement to single-value types only. The option rule inRedisSourceFactorymakes it required at the top level wheneverread_key_enabled = true, regardless ofdata_type(a hash config without it fails option validation), whiletables_configsentries are not covered by that validation and only single-value types need it at runtime (JsonKeyValueMergerthrows for single values without it). Documented the exact requirement and the multi-table exception; updated the Required column in the options table.Snowflake source & sink (
docs/{en,zh}/connectors/{source,sink}/Snowflake.md)GEOGRAPHY/GEOMETRY (WKB or EWKB) → BYTESdepending on the JDBC URL output format.SnowflakeTypeConvertermaps them toSTRINGunconditionally; onlyBINARY/VARBINARYmap toBYTES. Fixed in all four docs (sink doc also wrongly listed GEOGRAPHY/GEOMETRY in the BYTES row).DECIMAL(p, s) with p > 38 → DECIMAL(38, 18)row: the converter passes precision/scale through unchanged and never clamps to 38.TIMESTAMP_LTZ/TIMESTAMP_TZout of theTIMESTAMProw: the converter maps them toOFFSET_DATE_TIME_TYPE, i.e. SeaTunnelTIMESTAMP_TZ, notTIMESTAMP.generate_sink_sqloption (Boolean, defaultfalse,JdbcSinkOptions.GENERATE_SINK_SQL) to the sink options table — the doc's own CDC example and several option descriptions depend on it.SQL Server CDC (
docs/{en,zh}/connectors/source/SqlServer-CDC.md)connect.timeout | Duration | 30sdoes not exist in code; the connector readsconnect.timeout.ms(Long, default30000,JdbcSourceOptions.CONNECT_TIMEOUT_MS). Fixed name, type and default in both languages.server-time-zonedefault is notUTC; it defaults toZoneId.systemDefault().getId(). Fixed in both languages.table-namesandtable-patternwere both marked Required = Yes while being mutually exclusive (self-contradictory). Changed to "required when the other is not set", matching the.exclusive(...)rule inSqlServerIncrementalSourceFactory.debezium.heartbeat.*), and "Databases with special characters in the name".Other CDC connectors
docs/{en,zh}/connectors/source/Vitess-CDC.md): added the missingusername/passwordoptions (declared inVitessSourceOptions, advertised in the factory rule, consumed for VTGate gRPC auth).docs/{en,zh}/connectors/source/DB2-CDC.md): added the missingsplit.allow-samplingoption (Boolean, defaulttrue; read byJdbcSourceConfigFactoryand honored byAbstractJdbcSourceChunkSplitter).docs/{en,zh}/connectors/source/TiDB-CDC.md): added the missingdriveroption (JdbcCommonOptions.DRIVER, read byTiDBCatalogFactory); both task examples in the doc already set it.Others
docs/zh/connectors/source/Milvus.md): the zh text said loweringrate_limitavoids exceeding the cluster's "gRPC message size limit"; the code setscollection.queryRate.max.qps(a per-collection query QPS quota). Aligned with the English doc.docs/{en,zh}/connectors/sink/Sls.md): added the missinglog_group_sizeoption (Int, default100,SlsSinkOptions.LOG_GROUP_SIZE), documented as reserved since the current writer sends one log group per record.docs/zh/transforms/replace.md): restored the lost space character inside the inline code span ("replace the char"), which made the example impossible to understand.Areas updated
20 documentation files across connector sources/sinks, CDC connectors and one transform, always in matched en/zh pairs (19 files) plus one zh-only parity fix.
Both English and Chinese docs checked?
Yes. Every fix was applied to both the English and Chinese doc except: the Milvus
rate_limitfix (the English doc was already correct) and the zh SqlServer-CDC section port (which brings zh up to date with en).Duplicate check (last 7 days)
I searched all open PRs touching docs in
apache/seatunnelcreated in the last 7 days (viagh pr list --search "is:open docs"):None of the files or issues fixed here were touched by those PRs.
Verification
RedisSourceFactory,SnowflakeTypeConverter,JdbcSinkOptions,JdbcSourceOptions,SqlServerIncrementalSourceFactory,VitessSourceOptions,JdbcSourceConfigFactory,TiDBCatalogFactory,SlsSinkOptions,TDengineSource,MilvusSourceReader).