diff --git a/infra/common/src/main/java/org/apache/shardingsphere/infra/metadata/ShardingSphereMetaData.java b/infra/common/src/main/java/org/apache/shardingsphere/infra/metadata/ShardingSphereMetaData.java index 8b2bbe3f513e8..8a8e6d5a2f7da 100644 --- a/infra/common/src/main/java/org/apache/shardingsphere/infra/metadata/ShardingSphereMetaData.java +++ b/infra/common/src/main/java/org/apache/shardingsphere/infra/metadata/ShardingSphereMetaData.java @@ -104,10 +104,10 @@ public void addDatabase(final String databaseName, final DatabaseType protocolTy * @param databaseName database name */ public void dropDatabase(final String databaseName) { - closeResources(databases.remove(databaseName.toLowerCase())); + cleanResources(databases.remove(databaseName.toLowerCase())); } - private void closeResources(final ShardingSphereDatabase database) { + 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));