-
Notifications
You must be signed in to change notification settings - Fork 2.2k
[Fix][Connector-V2] Oracle cdc not update transaction commit when LOB enabled #9412
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
| // When a COMMIT is received, regardless of the number of events it has, it still | ||
| // must be recorded in the commit scn for the node to guarantee updates to the | ||
| // offsets. This must be done prior to dispatching the transaction-commit or the | ||
| // heartbeat event that follows commit dispatch. | ||
| offsetContext.getCommitScn().recordCommit(row); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
record the commit scn even no events.
e958bba to
e07a76b
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR addresses an issue in the Oracle CDC connector where transaction commits were not updated when LOB is enabled. The changes include updating test cases to use try‐with‐resources for better resource management, explicitly shutting down the Hazelcast client in tests, and adding a new test to validate the commit SCN behavior in the Oracle CDC connector.
Reviewed Changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| seatunnel-engine/seatunnel-engine-client/src/test/java/org/apache/seatunnel/engine/client/SeaTunnelClientTest.java | Updated tests to use try‐with‐resources ensuring proper client closure. |
| seatunnel-engine/seatunnel-engine-client/src/test/java/org/apache/seatunnel/engine/client/ConnectorPackageClientTest.java | Added an explicit shutdown for the Hazelcast client. |
| seatunnel-connectors-v2/connector-cdc/connector-cdc-oracle/src/test/java/io/debezium/connector/oracle/logminer/processor/AbstractLogMinerEventProcessorTest.java | Introduced a new test to check that the commit SCN is correctly updated after a commit event. |
| }); | ||
| }); | ||
| } | ||
| seaTunnelHazelcastClient.shutdown(); |
Copilot
AI
Jun 12, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[nitpick] If seaTunnelHazelcastClient implements AutoCloseable, consider using try-with-resources to automatically manage its lifecycle and safeguard against potential resource leaks.
|
|
||
| processor.handleCommit(partition, row); | ||
|
|
||
| Assertions.assertEquals(commitScn.getMaxCommittedScn(), Scn.valueOf(2)); |
Copilot
AI
Jun 12, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[nitpick] Consider swapping the parameters in assertEquals to follow the conventional order (expected, actual) for improved clarity.
| Assertions.assertEquals(commitScn.getMaxCommittedScn(), Scn.valueOf(2)); | |
| Assertions.assertEquals(Scn.valueOf(2), commitScn.getMaxCommittedScn()); |
# Conflicts: # seatunnel-engine/seatunnel-engine-client/src/test/java/org/apache/seatunnel/engine/client/SeaTunnelClientTest.java
Purpose of this pull request
Oracle cdc not update transaction commit when LOB enabled.
refer https://issues.redhat.com/browse/DBZ-5395.
Does this PR introduce any user-facing change?
How was this patch tested?
Check list
New License Guide