You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by zh...@apache.org on 2024/02/20 12:15:50 UTC
(shardingsphere) branch master updated: Rename ShardingSphereMetaData.cleanResources (#30212)
This is an automated email from the ASF dual-hosted git repository.
zhonghongsheng pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/shardingsphere.git
The following commit(s) were added to refs/heads/master by this push:
new 8fdfa1f27b4 Rename ShardingSphereMetaData.cleanResources (#30212)
8fdfa1f27b4 is described below
commit 8fdfa1f27b4a3c2717487d3f2deed796d065bc5e
Author: Liang Zhang <zh...@apache.org>
AuthorDate: Tue Feb 20 20:15:40 2024 +0800
Rename ShardingSphereMetaData.cleanResources (#30212)
---
.../apache/shardingsphere/infra/metadata/ShardingSphereMetaData.java | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
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 8b2bbe3f513..8a8e6d5a2f7 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 final class ShardingSphereMetaData {
* @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));