Skip to content

Commit

Permalink
perf(close-datasource): 在分组数据库map删除后删除datasource (#618)
Browse files Browse the repository at this point in the history
  • Loading branch information
BingChunMoLi committed Jan 10, 2024
1 parent f4951da commit 700d8c9
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,6 @@ public synchronized void removeDataSource(String ds) {
}
if (dataSourceMap.containsKey(ds)) {
DataSource dataSource = dataSourceMap.remove(ds);
closeDataSource(ds, dataSource, graceDestroy);
if (ds.contains(UNDERLINE)) {
String group = ds.split(UNDERLINE)[0];
if (groupDataSources.containsKey(group)) {
Expand All @@ -204,6 +203,7 @@ public synchronized void removeDataSource(String ds) {
}
}
}
closeDataSource(ds, dataSource, graceDestroy);
log.info("dynamic-datasource - remove the database named [{}] success", ds);
} else {
log.warn("dynamic-datasource - could not find a database named [{}]", ds);
Expand Down

0 comments on commit 700d8c9

Please sign in to comment.