happyboy1024 opened a new issue, #6019:
URL: https://github.com/apache/seatunnel/issues/6019

   ### Search before asking
   
   - [X] I had searched in the 
[issues](https://github.com/apache/seatunnel/issues?q=is%3Aissue+label%3A%22bug%22)
 and found no similar issues.
   
   
   ### What happened
   
   When I run the e2e test of TDengine. I found that when the parallelism 
degree is greater than 1, the `TDengineSinkWriter` cannot get the connection 
correctly during initialization. I analyzed the problem and came to the 
following conclusion:
   
   First of all, only this one task is running in Server. DriverManager will be 
loaded by the Jvm when it is used for the first time, and then the 
`loadInitialDrivers` method in the static code block will be executed to load 
the driver. However, at this time, our task is multi-parallel.  When the first 
thread attempts to load the driver, the other threads will directly fetch the 
connection, but if the first thread has not yet loaded, the other threads will 
directly throw an exception.
   
   ### SeaTunnel Version
   
   2.3.3
   
   ### SeaTunnel Config
   
   ```conf
   env {
     parallelism = 2
     job.mode = "BATCH"
   }
   
   source {
     TDengine {
       url: "jdbc:TAOS-RS://flink_e2e_tdengine_src:6041/"
       username: "root"
       password: "taosdata"
       database: "power"
       stable: "meters"
       lower_bound: "2018-10-03 14:38:05.000"
       upper_bound: "2018-10-03 14:38:16.801"
       result_table_name = "tdengine_result"
     }
   }
   
   transform {
   }
   
   sink {
     TDengine {
       url: "jdbc:TAOS-RS://flink_e2e_tdengine_sink:6041/"
       username: "root"
       password: "taosdata"
       database: "power2"
       stable: "meters2"
       timezone: "UTC"
     }
   }
   ```
   
   
   ### Running Command
   
   ```shell
   no command, this is runs in e2e case.
   ```
   
   
   ### Error Exception
   
   ```log
   Caused by: org.apache.seatunnel.common.utils.SeaTunnelException: 
java.sql.SQLException: No suitable driver found for 
jdbc:TAOS-RS://flink_e2e_tdengine_sink:6041/power2?user=root&***
   ```
   
   
   ### Zeta or Flink or Spark Version
   
   _No response_
   
   ### Java or Scala Version
   
   _No response_
   
   ### Screenshots
   
   _No response_
   
   ### Are you willing to submit PR?
   
   - [X] Yes I am willing to submit a PR!
   
   ### Code of Conduct
   
   - [X] I agree to follow this project's [Code of 
Conduct](https://www.apache.org/foundation/policies/conduct)
   


-- 
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