DanielCarter-stack commented on issue #10596:
URL: https://github.com/apache/seatunnel/issues/10596#issuecomment-4053700291
<!-- code-pr-reviewer -->
Thanks for the detailed proposal. I can confirm this configuration option is
indeed missing.
**Current state:**
- Both CDC and JDBC connectors only expose `sample-sharding.threshold` and
`inverse-sampling.rate` options
- No explicit enable/disable switch exists for sampling-based sharding
- Sampling is unconditionally triggered when `shardCount > threshold` in:
- `AbstractJdbcSourceChunkSplitter.java:170`
- `DynamicChunkSplitter.java:293`
**Proposed changes look good:**
1. Add `SAMPLE_SHARDING_ENABLE` / `SPLIT_SAMPLE_SHARDING_ENABLE` options in:
- `connector-cdc-base/.../JdbcSourceOptions.java`
- `connector-jdbc/.../JdbcSourceOptions.java`
2. Update config classes to read the new field
3. Modify the trigger condition to:
```java
if (sampleShardingEnable && sampleShardingThreshold < shardCount)
```
Defaulting to `true` maintains backward compatibility. This is appropriately
tagged as a good first issue.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]