Repository navigation
[Docs] Fix connector and transform doc inaccuracies verified against source code - #13410
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: several published option names, timeout promises and provider requirements do not match the implementations.
Fix: correct31 connector/transform guides against option definitions and their actual consumers.
In one sentence: users can choose settings based on what this version actually does. For example, setting an InfluxDB write_timeout does not change its HTTP client timeout today; the guide now says so.
1. Code changes
1.1 Core logic
Complete runtime path:
Documentation -> user config -> ReadonlyConfig / factory OptionRule -> connector config -> actual consumer
InfluxDB: SinkConfig.loadConfig -> InfluxDBClient.getInfluxDB only applies connect/read timeout
JDBC: connection config -> HiveJdbcConnectionProvider applies positive connect/socket timeouts
RabbitMQ: RabbitmqConfig parses delivery_timeout -> reader still queue.poll(5000ms)
MQTT: flushBuffer -> publishWithRetry -> fixed RETRY_BACKOFF_MS sleeping until retry deadline
DB2/Oracle CDC: table-pattern discovery -> source configuration; only tableList writes Debezium table.include.list
TiDB: factory -> TiDBCatalogFactory -> optional driver preference -> snapshot/stream reader
Embedding: conditional OptionRule -> provider config -> per-table/batched transform -> model request
StarRocks: SinkConfig.loadConfig -> production visitor constructor passes0 -> nonpositive config falls back180000ms -> nonfinal-label polling
Key findings and correctness:
- All31 changed files are documentation; no executable default or protocol is changed. Corrected JDBC split key names match the split options; url/base-url and embedding fallback aliases match ReadonlyConfig fallback handling.
- The unused-timeout statements are supported by consumer searches, not merely by the presence of a setter. Hive is the only JDBC timeout applier; RabbitMQ still uses a fixed poll; InfluxDB never forwards write_timeout.
- Embedding requirements match the provider-specific OptionRule, including the distinction between ZHIPU runtime API-key access and its dimension-only validation. Batch and multi-table defaults match their shared options.
- TiDB snapshotState returns split state, but that alone is not proof of end-to-end exactly-once delivery; removing the unqualified guarantee is appropriately conservative. The optional driver really is forwarded to the catalog and null falls back to DriverManager.
- One added assertion does not match current source: nonpositive StarRocks label timeouts are accepted and fall back to180000ms; there is no greater-than-zero validation in this path.
Before:
write_timeout: Write timeout used by the InfluxDB client.
After:
write_timeout: parsed for backward compatibility; currently not applied.
Only connect_timeout_ms and query_timeout_sec affect the HTTP client.
1.2 Compatibility
Fully compatible as documentation corrections: existing APIs, option names/defaults, protocols, serializers and runtime behavior are unchanged. The TiDB feature badge withdraws an unsupported blanket promise; it does not add a migration or change checkpoint bytes.
1.3 Performance and side effects
No CPU, memory, GC, network, lock, retry, idempotency or resource-lifecycle code changes. Better option guidance avoids relying on settings that are parsed but not applied.
1.4 Errors, logging, and findings
Issue 1: Describe the actual nonpositive label-timeout fallback
- Location:
docs/en/connectors/sink/StarRocks.md:55. - Description and risk: The new EN/ZH requirement implies that zero or negative label_state_timeout_ms is rejected. Production StarRocksStreamLoadVisitor.java:69-70 passes0 to the overload; lines98-105 choose the positive config value or DEFAULT_LABEL_STATE_TIMEOUT_MS. SinkConfig.loadConfig:103 simply copies the option, and the Option has no positive-value validator. Operators with0 therefore receive the built-in3-minute fallback, not a validation error. This documentation-only PR should describe that actual behavior.
- Best improvement: Replace the mandatory-positive claim in both languages with the actual nonpositive fallback to180000ms. A new rejection rule would change existing behavior and should not be introduced incidentally to make this documentation statement true.
- Responsibility and trade-off: Keep these corrections in the guides. Do not change runtime timeout validation, CDC capture policy or driver behavior merely to fit a new sentence.
- 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. Not applicable to UT/E2E stability: no test code changes. The current fork Build45210799698 is successful. Source searches and git show checked the consumers above; no local build, test or live connector validation was run. Java test lanes skipped for a docs-only change do not establish database behavior.
2.3 Documentation
EN/ZH matching changes were read in full. The untouched Chinese MQTT section already describes waiting/retry without claiming exponential backoff, so the EN-only correction does not introduce that contradiction. Matching guides for split-name fixes were checked; the new StarRocks positivity claim needs the bilingual correction below.
3. Architecture
3.1 Change location
Keep these corrections in the guides. Do not change runtime timeout validation, CDC capture policy or driver behavior merely to fit a new sentence.
3.2 Maintainability
Keep the behavior, lifecycle ownership, and failure contract together. Keep these corrections in the guides. Do not change runtime timeout validation, CDC capture policy or driver behavior merely to fit a new sentence.
3.3 Extensibility
Prefer the existing component boundary and tests over unrelated shared abstractions.
3.4 Upgrade impact
Fully compatible as documentation corrections: existing APIs, option names/defaults, protocols, serializers and runtime behavior are unchanged. The TiDB feature badge withdraws an unsupported blanket promise; it does not add a migration or change checkpoint bytes.
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 | Describe the actual nonpositive label-timeout fallback | docs/en/connectors/sink/StarRocks.md:55 |
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 169fb4d157e3cb74ddb52b0e79ae2645797688cc against merge base ef9c7ee2586c97115ecc0baf6d928cba4f46d6d9. git diff --check passed. I did not build, run tests, or execute SeaTunnel locally.
Review time: 2026-11-24T07:07:20.291305-05:00
Local evidence: git fetch obtained head 169fb4d157e3cb74ddb52b0e79ae2645797688cc; git merge-base returned ef9c7ee2586c97115ecc0baf6d928cba4f46d6d9; git diff --stat reports 31 files changed, 119 insertions(+), 76 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.
…meout_ms fallback StarRocksStreamLoadVisitor treats a non-positive label_state_timeout_ms as 'unset' and falls back to the built-in 180000 ms default instead of rejecting the value; the option has no positive-value validator, so the new 'must be greater than 0' wording in en/zh was inaccurate. Describe the real fallback behavior instead.
Yes, I am contributing to Apache SeaTunnel.
What documentation issues were found
While auditing connector/transform docs against the Java source code (option definitions, factory
optionRule()s, and reader/writer implementations), I found the following real inaccuracies:Jdbc.md,Mysql.md,PostgreSQL.md,Oracle.md,SqlServer.md,Kingbase.mdreferencedchunk-key.even-distribution.factor.upper-bound/lower-bound, but the JDBC source defines these options assplit.even-distribution.factor.*(JdbcSourceOptions.java:57,68). The CDC connectors genuinely usechunk-key.*(cdc-baseJdbcSourceOptions), so only the non-CDC JDBC docs were corrected.connect_timeout_ms/socket_timeout_msdocumented as general timeouts — code only applies them in the Hive dialect provider (HiveJdbcConnectionProvider); other dialects ignore them. Docs now say so, and0is described accurately (driver default, not "no timeout").multi_table.failure_policy(source, defaultFAIL_FAST,MultiTableCommonOptions.java) andmulti_table_sink_replica(sink, default1,SinkConnectorCommonOptions.java), plus the legacybase-urlfallback key forurl.process_batch_size(default 100, aliasinference_batch_size) and the multi-table options (table_transform,table_match_regex,rule_match_mode) were missing entirely;custom_config,oauth_path,dimension,aws_regionare conditionally required perEmbeddingTransformFactory.optionRule()but were documented as plain "no"; thecustom_configexample had an unclosed string quote ("Bearer xxxxxxx→ config would not parse).MqttSinkWritersleeps a fixed 200 ms (RETRY_BACKOFF_MS = 200L).delivery_timeoutis parsed but never read by the connector (getDeliveryTimeout()has no callers); docs now disclose this. Sinkrabbitmq.configdefault corrected to{}(code default is an empty map, not unset).write_timeoutis dead (never applied to the OkHttp client); docs disclose this. SourceepochexamplesH/MSare wrong: the source passes the value raw to the InfluxDB HTTP API which only accepts lowercase (h,m,s,ms,u,n).[x] exactly-once, but nothing inconnector-cdc-tidbimplements exactly-once (no option, plainSourceReader);driveris consumed viaTiDBCatalogFactoryand used in the doc's own examples but was missing from the option table.database-namesmarked optional, butOracleSourceConfigFactory.create()callscheckNotNull(databaseList.get(0))so the job fails without it → now documented as required;table-patternis not applied to the Debezium capture list (onlytable-namesis) → clarified;server-time-zonedefault corrected to "JVM system time zone" (JdbcSourceOptionsdefaultZoneId.systemDefault()).server-time-zonedefault fix, sametable-patternclarification, and added the missingsplit.allow-samplingrow (honored via the sharedJdbcSourceConfigFactory).starrocks.config.format(StreamLoadFormat.JSON) and thatlabel_state_timeout_msmust be > 0 (Conditions.greaterThan(..., 0L)).Jdbc.md— heading#### 示例可选was a mistranslation of en's#### dialect list→#### 方言列表.What was changed
multi_table.failure_policy,multi_table_sink_replica,driver,split.allow-sampling,process_batch_size, multi-table options)delivery_timeout,write_timeout)Areas/files updated
31 files (en + zh): connectors
Jdbc(source/sink),Mysql,PostgreSQL,Oracle,SqlServer,Kingbase,Oracle-CDC,DB2-CDC,TiDB-CDC,StarRocks(sink),Rabbitmq(source/sink),Mqtt(sink),InfluxDB(source/sink); transformembedding.English and Chinese docs
Yes, both were checked and fixed in lockstep; every en fix has its zh counterpart except where zh text differs structurally (e.g., the MQTT backoff claim only existed in en).
Duplicate PR check (last 7 days)
I listed all PRs authored in the last 7 days and diffed their file lists against this branch's changed files:
Mysql.md/PostgreSQL.md/Kingbase.md— I verified its hunks addnumeric_special_value_as_nullrows and do not fix thechunk-key.*stale names, so there is no duplicated content (only benign same-file proximity).doris.config), the StarRocks CDC examplebase-url, and the embeddingapi_keywording. To avoid duplicating it, I excluded those three fixes from this PR (verified viagh pr diff 13274).Verification
Mqtt.mdis a pre-existing escaped-pipe\|false positive present on upstream/dev).docs/en+docs/zh: no new broken links introduced../mvnw spotless:apply/./mvnw verify— this PR contains no Java/config changes (docs-only), and Spotless does not process Markdown; the documentation checks above cover the changed files.