starlight2003 opened a new issue, #4461: URL: https://github.com/apache/shenyu/issues/4461
### Is there an existing issue for this? - [X] I have searched the existing issues ### Current Behavior  i use shenyu2.5.1 with zookeeper sync way , when i delete selector,rule, shenyubootstrap gateway cache still exists ### Expected Behavior when i delete selector ,rule in the admin, the gateway cache be removed. ### Steps To Reproduce 1. apache shenyu 2.5.1 2. sync: zookeeper: url: ****:2181 sessionTimeout: 5000 connectionTimeout: 2000 3. i delete selector 4. i select the cache , http://localhost:9195/shenyu/plugin/selector/findList?pluginName=divide ### Environment ```markdown ShenYu version(s):2.5.1 ``` ### Debug logs ERROR org.apache.curator.framework.recipes.cache.TreeCache - java.lang.NullPointerException: null at org.apache.shenyu.plugin.base.trie.ShenyuTrieRuleListener.onApplicationEvent(ShenyuTrieRuleListener.java:42) at org.apache.shenyu.plugin.base.trie.ShenyuTrieRuleListener.onApplicationEvent(ShenyuTrieRuleListener.java:35) at org.springframework.context.event.SimpleApplicationEventMulticaster.doInvokeListener(SimpleApplicationEventMulticaster.java:176) at org.springframework.context.event.SimpleApplicationEventMulticaster.invokeListener(SimpleApplicationEventMulticaster.java:169) at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:143) at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:421) at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:378) at org.apache.shenyu.plugin.base.cache.CommonPluginDataSubscriber.removeCacheData(CommonPluginDataSubscriber.java:252) at org.apache.shenyu.plugin.base.cache.CommonPluginDataSubscriber.lambda$subscribeDataHandler$4(CommonPluginDataSubscriber.java:170) at java.util.Optional.ifPresent(Optional.java:159) at org.apache.shenyu.plugin.base.cache.CommonPluginDataSubscriber.subscribeDataHandler(CommonPluginDataSubscriber.java:170) at org.apache.shenyu.plugin.base.cache.CommonPluginDataSubscriber.unRuleSubscribe(CommonPluginDataSubscriber.java:147) at org.apache.shenyu.sync.data.zookeeper.ZookeeperSyncDataService.lambda$unCacheRuleData$7(ZookeeperSyncDataService.java:137) at java.util.Optional.ifPresent(Optional.java:159) at org.apache.shenyu.sync.data.zookeeper.ZookeeperSyncDataService.unCacheRuleData(ZookeeperSyncDataService.java:137) at org.apache.shenyu.sync.data.zookeeper.ZookeeperSyncDataService.access$800(ZookeeperSyncDataService.java:50) at org.apache.shenyu.sync.data.zookeeper.ZookeeperSyncDataService$RuleCacheListener.event(ZookeeperSyncDataService.java:291) at org.apache.shenyu.sync.data.zookeeper.ZookeeperSyncDataService$AbstractDataSyncListener.childEvent(ZookeeperSyncDataService.java:180) at org.apache.curator.framework.recipes.cache.TreeCache$2.apply(TreeCache.java:760) at org.apache.curator.framework.recipes.cache.TreeCache$2.apply(TreeCache.java:754) at org.apache.curator.framework.listen.ListenerContainer$1.run(ListenerContainer.java:100) at org.apache.curator.shaded.com.google.common.util.concurrent.DirectExecutor.execute(DirectExecutor.java:30) at org.apache.curator.framework.listen.ListenerContainer.forEach(ListenerContainer.java:92) at org.apache.curator.framework.recipes.cache.TreeCache.callListeners(TreeCache.java:753) at org.apache.curator.framework.recipes.cache.TreeCache.access$1900(TreeCache.java:75) at org.apache.curator.framework.recipes.cache.TreeCache$4.run(TreeCache.java:865) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) at java.util.concurrent.FutureTask.run$$$capture(FutureTask.java:266) at java.util.concurrent.FutureTask.run(FutureTask.java) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at java.lang.Thread.run(Thread.java:748) ### Anything else? _No response_ -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
