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

Dev fix update sources in修复更新数据源之后,可能另外一个机器上部署的服务没更新 #2355fo #2356

Open
wants to merge 1 commit into
base: dev
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -143,11 +143,15 @@ private JdbcProperties conv2JdbcProperties(DataProviderSource config) {
private JdbcDataProviderAdapter matchProviderAdapter(DataProviderSource source) {
JdbcDataProviderAdapter adapter;
adapter = cachedProviders.get(source.getSourceId());
if (adapter != null) {
return adapter;
JdbcProperties newJdbcProperties = conv2JdbcProperties(source);
boolean needCreateNewDataProvider = (adapter == null || !Objects.equals(adapter.getJdbcProperties(), newJdbcProperties));
if (needCreateNewDataProvider) {
if (adapter != null) {
resetSource(source);
}
adapter = ProviderFactory.createDataProvider(newJdbcProperties, true);
cachedProviders.put(source.getSourceId(), adapter);
}
adapter = ProviderFactory.createDataProvider(conv2JdbcProperties(source), true);
cachedProviders.put(source.getSourceId(), adapter);
return adapter;
}

Expand Down
Loading