jack-wqing opened a new issue, #16845: URL: https://github.com/apache/dolphinscheduler/issues/16845
### 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 类: org.apache.dolphinscheduler.plugin.datasource.api.plugin.DataSourceClientProvider dataSouce本地缓存: 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: 指定的时间到之后,不管怎样都是强者关闭DataSource 更好的方式可以使用 expireAfterAccess 替代,保存使用的过程中尽量不被关闭 ### How to reproduce 比如Hive场景,hql执行时间一般较长,使用的过程DataSource比关闭;导致hive thrift地址的socket被关闭,但是内部状态判断还在继续 案例: 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]
