Skip to content

Conversation

@Hisoka-X
Copy link
Member

@Hisoka-X Hisoka-X commented Jun 9, 2025

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

Comment on lines +470 to +474
// 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);
Copy link
Member Author

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.

@Hisoka-X Hisoka-X force-pushed the fix-oracle-cdc-scn branch from e958bba to e07a76b Compare June 10, 2025 02:58
@github-actions github-actions bot added the Zeta label Jun 11, 2025
hailin0
hailin0 previously approved these changes Jun 12, 2025
Copy link
Contributor

Copilot AI left a 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();
Copy link

Copilot AI Jun 12, 2025

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.

Copilot uses AI. Check for mistakes.

processor.handleCommit(partition, row);

Assertions.assertEquals(commitScn.getMaxCommittedScn(), Scn.valueOf(2));
Copy link

Copilot AI Jun 12, 2025

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.

Suggested change
Assertions.assertEquals(commitScn.getMaxCommittedScn(), Scn.valueOf(2));
Assertions.assertEquals(Scn.valueOf(2), commitScn.getMaxCommittedScn());

Copilot uses AI. Check for mistakes.
# Conflicts:
#	seatunnel-engine/seatunnel-engine-client/src/test/java/org/apache/seatunnel/engine/client/SeaTunnelClientTest.java
@corgy-w corgy-w merged commit 2a25bae into apache:dev Jun 16, 2025
6 checks passed
chncaesar pushed a commit to chncaesar/seatunnel that referenced this pull request Jun 30, 2025
dybyte pushed a commit to dybyte/seatunnel that referenced this pull request Jul 23, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants