From 1320226df31d158fa3d4398ebbe66890a39d2651 Mon Sep 17 00:00:00 2001 From: Liang Zhang Date: Thu, 19 Sep 2024 00:17:41 +0800 Subject: [PATCH] Refactor DatabaseRuleConfigurationManager (#32921) --- .../metadata/manager/DatabaseRuleConfigurationManager.java | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/mode/core/src/main/java/org/apache/shardingsphere/mode/metadata/manager/DatabaseRuleConfigurationManager.java b/mode/core/src/main/java/org/apache/shardingsphere/mode/metadata/manager/DatabaseRuleConfigurationManager.java index cc2dd8684105d..72e3a1f6fb17d 100644 --- a/mode/core/src/main/java/org/apache/shardingsphere/mode/metadata/manager/DatabaseRuleConfigurationManager.java +++ b/mode/core/src/main/java/org/apache/shardingsphere/mode/metadata/manager/DatabaseRuleConfigurationManager.java @@ -17,7 +17,6 @@ package org.apache.shardingsphere.mode.metadata.manager; -import lombok.extern.slf4j.Slf4j; import org.apache.shardingsphere.infra.config.rule.RuleConfiguration; import org.apache.shardingsphere.infra.config.rule.scope.DatabaseRuleConfiguration; import org.apache.shardingsphere.infra.instance.ComputeNodeInstanceContext; @@ -42,7 +41,6 @@ /** * Database rule configuration manager. */ -@Slf4j public final class DatabaseRuleConfigurationManager { private final AtomicReference metaDataContexts; @@ -75,8 +73,8 @@ public synchronized void alterRuleConfiguration(final String databaseName, final return; } rules.removeIf(each -> each.getConfiguration().getClass().isAssignableFrom(ruleConfig.getClass())); - rules.addAll(DatabaseRulesBuilder.build(databaseName, database.getProtocolType(), database.getRuleMetaData().getRules(), - ruleConfig, computeNodeInstanceContext, database.getResourceMetaData())); + rules.addAll(DatabaseRulesBuilder.build( + databaseName, database.getProtocolType(), database.getRuleMetaData().getRules(), ruleConfig, computeNodeInstanceContext, database.getResourceMetaData())); refreshMetadata(databaseName, database, rules); }