goutamadwant opened a new pull request, #11815:
URL: https://github.com/apache/seatunnel/pull/11815
### Purpose of this pull request
This implements the MongoDB CDC slice of #11739.
MongoDB CDC already has timestamp offset ordering and a bounded stream fetch
path, but its public configuration only allowed `stop.mode = never`. This
change exposes the existing timestamp stop capability without changing the
default behavior.
- allow `stop.mode = timestamp`
- require `stop.timestamp` when timestamp mode is selected
- keep `never` as the default
- continue rejecting unsupported specific offsets
- document MongoDB's second-level timestamp precision
- add unit and Zeta E2E coverage for bounded completion
### Does this PR introduce _any_ user-facing change?
Yes.
MongoDB CDC jobs can now set `stop.mode = timestamp` with `stop.timestamp`
to read a bounded change-stream interval. The connector drains records produced
before the boundary and then finishes.
Existing jobs continue to use `never` by default.
### How was this patch tested?
The unit suite covers supported stop modes, timestamp conversion and
rejection of unsupported specific offsets.
The Zeta E2E test verifies that the job reaches `RUNNING`, emits exactly the
two records before the stop timestamp, excludes a record after the boundary,
exits successfully and reaches `FINISHED`.
Verified on JDK 11 with:
```shell
./mvnw -pl seatunnel-connectors-v2/connector-cdc/connector-cdc-mongodb test
./mvnw -pl seatunnel-connectors-v2/connector-cdc/connector-cdc-mongodb \
-DskipTests package
./mvnw -pl seatunnel-connectors-v2/connector-jdbc \
-DskipTests package
./mvnw -pl
seatunnel-e2e/seatunnel-connector-v2-e2e/connector-cdc-mongodb-e2e \
-DskipUT=true \
-DskipIT=false \
-Dit.test=MongodbCDCIT#testMongodbCdcTimestampStopMode \
-Dapi.version=1.44 verify
```
### Check list
* [x] No new Jar binary package is added.
* [x] English and Chinese connector documentation is updated.
* [x] This is backward compatible, so `incompatible-changes.md` is not
required.
* [x] This updates an existing connector, so plugin mapping, distribution
POM, label scope and plugin configuration changes are not required.
* [x] A focused connector E2E test is added.
--
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]