TheoLi0905 opened a new issue, #7034: URL: https://github.com/apache/shenyu/issues/7034
### Is there an existing issue for this? - [x] I have searched the existing issues ### Current Behavior WebSocket REFRESH and MYSELF handling removes the received Plugin, Selector and Rule entries from the cache, then adds them back one by one. Request threads read these caches concurrently. Between removal and re-subscription, valid configuration is temporarily unavailable: a plugin may be skipped, or selector/rule matching may fail. This can happen during synchronization after a WebSocket reconnect or an explicit refresh, even when the configuration has not changed. ### Expected Behavior Refreshing unchanged configuration should not temporarily make it unavailable to requests. The existing cache should remain readable while the refreshed batch is being built. The completed batch should then become visible in one publication. ### Steps To Reproduce 1. Configure WebSocket data synchronization and a divide route with one matching selector and rule. Confirm that requests succeed. 2. Trigger synchronization by reconnecting the gateway to Admin. 3. For deterministic reproduction, pause SelectorDataHandler.doRefresh() immediately after refreshSelectorDataSelf(dataList) and before the subscription loop. 4. Send a request to the configured route. The selector is temporarily absent from BaseDataCache, so matching fails. 5. Resume synchronization. The selector is added back and matching succeeds again. Plugin and Rule refresh handlers contain the same remove-then-add interval. ### Environment ```markdown ShenYu version(s): 2.7.2-SNAPSHOT Code baseline: master at 7273f23b7, before the proposed fix Data synchronization: WebSocket ``` ### Debug logs _No response_ ### Anything else? The proposed fix is limited to removing the temporary cache gap. It preserves entries absent from the received batch and keeps the existing empty-batch behavior, since REFRESH can also contain single-plugin synchronization data. -- 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]
