goutamadwant opened a new pull request, #11171:
URL: https://github.com/apache/seatunnel/pull/11171
### Purpose of this pull request
Fixes #11041.
This PR adds Oracle CDC support for starting from a user-provided SCN with:
- startup.mode = specific
- startup.specific-offset.scn = 123456789
The configured SCN is mapped into the existing Oracle redo-log offset model,
so the incremental split uses the same offset shape as the current latest and
timestamp startup paths. Invalid combinations fail early, including missing
SCN, non-positive SCN, or file/position offsets with Oracle specific startup.
The Oracle CDC docs are also updated to describe SCN based specific startup
instead of binlog file/position options.
### Does this PR introduce _any_ user-facing change?
Yes. Oracle CDC users can now configure SCN based specific startup with
startup.specific-offset.scn.
The previous Oracle CDC docs mentioned binlog file/position specific
startup, but the Oracle connector does not use binlog file/position offsets.
This PR documents and validates the Oracle-specific SCN config instead.
If the configured SCN is no longer available to the selected Oracle log
mining backend, startup should fail from the normal Oracle/Debezium recovery
path instead of silently falling back to another startup mode.
### How was this patch tested?
Added unit coverage for:
- requiring startup.specific-offset.scn when startup.mode = specific
- rejecting non-positive SCN values
- mapping the configured SCN into RedoLogOffset
- preserving the SCN-derived startup offset through IncrementalSplitState
restore
- rejecting startup.specific-offset.scn outside specific startup mode
- rejecting file/position offsets for Oracle specific startup
Verified locally with:
JAVA_HOME=$(/usr/libexec/java_home -v 11) PATH="$JAVA_HOME/bin:$PATH" ./mvnw
-pl seatunnel-connectors-v2/connector-cdc/connector-cdc-oracle
-Dtest=OracleIncrementalSourceFactoryTest test
JAVA_HOME=$(/usr/libexec/java_home -v 11) PATH="$JAVA_HOME/bin:$PATH" ./mvnw
-pl seatunnel-connectors-v2/connector-cdc/connector-cdc-oracle
-DfailIfNoTests=false package
### Check list
* [ ] If any new Jar binary package adding in your PR, please add License
Notice according
[New License
Guide](https://github.com/apache/seatunnel/blob/dev/docs/en/developer/new-license.md)
* [x] If necessary, please update the documentation to describe the new
feature. https://github.com/apache/seatunnel/tree/dev/docs
* [ ] If necessary, please update `incompatible-changes.md` to describe the
incompatibility caused by this PR.
* [ ] If you are contributing the connector code, please check that the
following files are updated:
1. Update
[plugin-mapping.properties](https://github.com/apache/seatunnel/blob/dev/plugin-mapping.properties)
and add new connector information in it
2. Update the pom file of
[seatunnel-dist](https://github.com/apache/seatunnel/blob/dev/seatunnel-dist/pom.xml)
3. Add ci label in
[label-scope-conf](https://github.com/apache/seatunnel/blob/dev/.github/workflows/labeler/label-scope-conf.yml)
4. Add e2e testcase in
[seatunnel-e2e](https://github.com/apache/seatunnel/tree/dev/seatunnel-e2e/seatunnel-connector-v2-e2e/)
5. Update connector
[plugin_config](https://github.com/apache/seatunnel/blob/dev/config/plugin_config)
--
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]