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:
   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)
   
![image](https://github.com/user-attachments/assets/07bae310-c0aa-4de9-b9e1-41458892063f)
   
   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, 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]

Reply via email to