Skip to content

Commit

Permalink
Refactor ShardingSphereMetaData (#30214)
Browse files Browse the repository at this point in the history
  • Loading branch information
terrymanu authored Feb 20, 2024
1 parent 8fdfa1f commit 90075fe
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ private void cleanResources(final ShardingSphereDatabase database) {
String databaseName = database.getName();
globalRuleMetaData.findRules(ResourceHeldRule.class).forEach(each -> each.closeStaleResource(databaseName));
database.getRuleMetaData().findRules(ResourceHeldRule.class).forEach(each -> each.closeStaleResource(databaseName));
database.getRuleMetaData().findSingleRule(StaticDataSourceContainedRule.class).ifPresent(StaticDataSourceContainedRule::cleanStorageNodeDataSources);
database.getRuleMetaData().findRules(StaticDataSourceContainedRule.class).forEach(StaticDataSourceContainedRule::cleanStorageNodeDataSources);
Optional.ofNullable(database.getResourceMetaData())
.ifPresent(optional -> optional.getStorageUnits().values().forEach(each -> new DataSourcePoolDestroyer(each.getDataSource()).asyncDestroy()));
}
Expand Down

0 comments on commit 90075fe

Please sign in to comment.