This is an automated email from the ASF dual-hosted git repository.
duanzhengqiang 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 3ad9e0bfe5a Fix failure to obtain decorator SPI in
GlobalRuleChangedHandler (#34237)
3ad9e0bfe5a is described below
commit 3ad9e0bfe5a9a9789cec94a5eeb74a5ee25a5e84
Author: Raigor <[email protected]>
AuthorDate: Fri Jan 3 13:04:43 2025 +0800
Fix failure to obtain decorator SPI in GlobalRuleChangedHandler (#34237)
---
.../cluster/dispatch/handler/global/GlobalRuleChangedHandler.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git
a/mode/type/cluster/core/src/main/java/org/apache/shardingsphere/mode/manager/cluster/dispatch/handler/global/GlobalRuleChangedHandler.java
b/mode/type/cluster/core/src/main/java/org/apache/shardingsphere/mode/manager/cluster/dispatch/handler/global/GlobalRuleChangedHandler.java
index 3bbb1a5361c..7ab73fb1474 100644
---
a/mode/type/cluster/core/src/main/java/org/apache/shardingsphere/mode/manager/cluster/dispatch/handler/global/GlobalRuleChangedHandler.java
+++
b/mode/type/cluster/core/src/main/java/org/apache/shardingsphere/mode/manager/cluster/dispatch/handler/global/GlobalRuleChangedHandler.java
@@ -63,6 +63,6 @@ public final class GlobalRuleChangedHandler implements
DataChangedEventHandler {
Optional<RuleConfiguration> ruleConfig =
contextManager.getPersistServiceFacade().getMetaDataPersistService().getGlobalRuleService().load(ruleName.get());
Preconditions.checkArgument(ruleConfig.isPresent(), "Can not find rule
configuration with name: %s", ruleName.get());
contextManager.getMetaDataContextManager().getGlobalConfigurationManager().alterGlobalRuleConfiguration(
-
TypedSPILoader.findService(RuleConfigurationPersistDecorator.class,
ruleConfig.getClass()).map(optional ->
optional.restore(ruleConfig.get())).orElse(ruleConfig.get()));
+
TypedSPILoader.findService(RuleConfigurationPersistDecorator.class,
ruleConfig.get().getClass()).map(optional ->
optional.restore(ruleConfig.get())).orElse(ruleConfig.get()));
}
}