Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]数据源连接DataSource中动态的ConnectionTimeout属性被覆盖为3秒,且无法外部更改 #9101

Closed
wuchubuzai2018 opened this issue Sep 6, 2022 · 4 comments · Fixed by #9115
Assignees

Comments

@wuchubuzai2018
Copy link
Contributor

Describe the bug
配置模块中DataSourcePoolProperties 类的ConnectionTimeout属性默认设置为30s,且提供了外部动态更改的代码处理。
但是在ExternalDataSourceProperties类中的build方法中覆盖了连接超时为3L
ds.setConnectionTimeout(TimeUnit.SECONDS.toMillis(3L));
会导致无法外部设置参数,在某些数据库响应变慢的时候,无法连接的情况。

Expected behavior
期待可以删除这个覆盖的链接超时参数,使用DataSourcePoolProperties中的配置

Actually behavior
出现3S覆盖的情况

Desktop (please complete the following information):

  • Version nacos-config develop 以及任何版本
  • Module nacos-config

我是否可以提交一个PR,将这个默认的ds.setConnectionTimeout(TimeUnit.SECONDS.toMillis(3L));覆盖3S的代码删除掉

@KomachiSion
Copy link
Collaborator

我觉得可以, IdleTimeout应该也可以。

@KomachiSion
Copy link
Collaborator

@shiyiyue1102 @realJackSun 确认一下。

@shiyiyue1102
Copy link
Collaborator

可以删除

@wuchubuzai2018
Copy link
Contributor Author

可以删除

好的,我找时间,删除下并提交下PR,那么默认给他30S连接合适,还是保持3S连接超时比较好呢。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants