This is an automated email from the ASF dual-hosted git repository.
liuhongyu pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/shenyu.git
The following commit(s) were added to refs/heads/master by this push:
new e1a48a160e fix unCacheRuleData failed when use nacos as sync center
(#5929)
e1a48a160e is described below
commit e1a48a160e37a4c26a25dfe34954977e74eb39f1
Author: Wweiei <[email protected]>
AuthorDate: Wed Feb 12 09:28:31 2025 +0800
fix unCacheRuleData failed when use nacos as sync center (#5929)
Co-authored-by: aias00 <[email protected]>
---
.../apache/shenyu/sync/data/core/AbstractNodeDataSyncService.java | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git
a/shenyu-sync-data-center/shenyu-sync-data-api/src/main/java/org/apache/shenyu/sync/data/core/AbstractNodeDataSyncService.java
b/shenyu-sync-data-center/shenyu-sync-data-api/src/main/java/org/apache/shenyu/sync/data/core/AbstractNodeDataSyncService.java
index 7d81c25eff..5e44ae7d69 100644
---
a/shenyu-sync-data-center/shenyu-sync-data-api/src/main/java/org/apache/shenyu/sync/data/core/AbstractNodeDataSyncService.java
+++
b/shenyu-sync-data-center/shenyu-sync-data-api/src/main/java/org/apache/shenyu/sync/data/core/AbstractNodeDataSyncService.java
@@ -245,9 +245,9 @@ public abstract class AbstractNodeDataSyncService {
protected void unCacheRuleData(final String removeKey) {
final RuleData ruleData = new RuleData();
final String[] ruleKeys = StringUtils.split(removeKey,
DefaultNodeConstants.JOIN_POINT);
- ruleData.setPluginName(ruleKeys[1]);
- ruleData.setSelectorId(ruleKeys[2]);
- ruleData.setId(ruleKeys[3]);
+ ruleData.setPluginName(ruleKeys[2]);
+ ruleData.setSelectorId(ruleKeys[3]);
+ ruleData.setId(ruleKeys[4]);
Optional.ofNullable(pluginDataSubscriber).ifPresent(e ->
e.unRuleSubscribe(ruleData));
removeListener(removeKey);
}