Aias00 opened a new issue, #6840:
URL: https://github.com/apache/shenyu/issues/6840

   ## Description
   `PolarisSyncDataService.doRemoveListener` removes the listener from the 
`ConfigFile` but does **not** remove the entry from `watchCache` (contrast 
`NacosSyncDataService.doRemoveListener:85` which calls 
`watchCache.remove(key)`). When 
`AbstractNodeDataSyncService.unCacheSelectorData/unCacheRuleData/etc` call 
`removeListener → doRemoveListener`, the stale entry remains. When the same key 
is re-created, `getServiceConfig` checks `watchCache.containsKey(key)` → true → 
returns null at `:77-78` without registering a new listener, so the re-created 
item is never watched/fetched.
   
   ## Location
   - 
`shenyu-sync-data-center/shenyu-sync-data-polaris/src/main/java/org/apache/shenyu/sync/data/polaris/PolarisSyncDataService.java:105-111`
   
   ## Impact
   After any delete+recreate of the same config key, the gateway misses the new 
data; routes stay stale/missing until full restart.
   
   ## Suggested fix
   Add `watchCache.remove(removeKey)` in `doRemoveListener`.
   
   ## Related existing
   None.
   


-- 
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]

Reply via email to