screnwei commented on code in PR #8958:
URL: https://github.com/apache/seatunnel/pull/8958#discussion_r2057933017
##########
seatunnel-connectors-v2/connector-cdc/connector-cdc-oracle/src/main/java/org/apache/seatunnel/connectors/seatunnel/cdc/oracle/source/reader/fetch/scan/OracleSnapshotSplitReadTask.java:
##########
@@ -164,6 +165,13 @@ protected SnapshottingTask getSnapshottingTask(
@Override
protected SnapshotContext<OraclePartition, OracleOffsetContext> prepare(
OraclePartition partition) throws Exception {
+ String currentContainerName =
OracleConnectionUtils.getCurrentContainerName(jdbcConnection);
Review Comment:
@hailin0 This parameter "debezium.database.pdb.name" needs to be
configured, but if multiple partitions are executed, it will report a "table
not found" error.
[issues/8463](https://github.com/apache/seatunnel/issues/8463#issuecomment-2650075780)

The reason is here in the
[complete](https://github.com/apache/seatunnel/blob/0fed6f605c77f19f0578b7f9d5bd577002c0c162/seatunnel-connectors-v2/connector-cdc/connector-cdc-oracle/src/main/java/org/apache/seatunnel/connectors/seatunnel/cdc/oracle/source/reader/fetch/scan/OracleSnapshotSplitReadTask.java#L173)
method, the jdbcConnection is reset to CDB. When the next partition uses the
same jdbcConnection, during the execution of doExecute, it tries to query PDB
tables in CDB session, which results in a "table not found" error. So I added
a check in the prepare method to switch PDB.
--
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]