github-actions[bot] commented on issue #16845:
URL: 
https://github.com/apache/dolphinscheduler/issues/16845#issuecomment-2499736115

   ### Search before asking
   
   - [X] I had searched in the 
[issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and 
found no similar issues.
   
   
   ### What happened
   
   Class: 
org.apache.dolphinscheduler.plugin.datasource.api.plugin.DataSourceClientProvider
   dataSouce local cache: private static final Cache<String, DataSourceClient> 
uniqueId2dataSourceClientCache = CacheBuilder.newBuilder()
           .expireAfterWrite(duration, TimeUnit.HOURS)
           .removalListener((RemovalListener<String, DataSourceClient>) 
notification -> {
               try (DataSourceClient closedClient = notification.getValue()) {
                   logger.info("Datasource: {} is removed from cache due to 
expire", notification.getKey());
               }
           })
           .maximumSize(100)
           .build();
   
   
   ### What you expected to happen
   
   expireAfterWrite: After the specified time is up, the strong one will close 
the DataSource no matter what.
   A better way can be to use expireAfterAccess instead, and try not to be 
closed during saving and use.
   
   ### How to reproduce
   
   For example, in the Hive scenario, hql execution time is generally long, and 
the process DataSource used is closed; causing the socket of the hive thrift 
address to be closed, but the internal status judgment continues.
   Case:
   sql task error and appId:[]
   java.sql.SQLException: org.apache.thrift.transport.TTransportException: SASL 
authentication not complete
   at 
org.apache.hive.jdbc.HiveStatement.waitForOperationToComplete(HiveStatement.java:399)
   at org.apache.hive.jdbc.HiveStatement.execute(HiveStatement.java:254)
   at org.apache.hive.jdbc.HiveStatement.executeUpdate(HiveStatement.java:490)
   at 
org.apache.hive.jdbc.HivePreparedStatement.executeUpdate(HivePreparedStatement.java:122)
   at 
com.zaxxer.hikari.pool.ProxyPreparedStatement.executeUpdate(ProxyPreparedStatement.java:61)
   at 
com.zaxxer.hikari.pool.HikariProxyPreparedStatement.executeUpdate(HikariProxyPreparedStatement.java)
   at 
org.apache.dolphinscheduler.plugin.task.sql.SqlTask.executeUpdate(SqlTask.java:323)
   at 
org.apache.dolphinscheduler.plugin.task.sql.SqlTask.executeFuncAndSql(SqlTask.java:220)
   at 
org.apache.dolphinscheduler.plugin.task.sql.SqlTask.handle(SqlTask.java:167)
   at
   
   ### Anything else
   
   _No response_
   
   ### Version
   
   3.1.x
   
   ### 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