You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shenyu.apache.org by "Aias00 (via GitHub)" <gi...@apache.org> on 2026/08/04 02:51:36 UTC

[I] [BUG] Apollo incremental change events silently dropped (bare data-ID prefixes vs namespace-prefixed keys) [shenyu]

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

   ## Description
   `ApolloDataService` registers `configService.addChangeListener(listener, emptySet, ApolloPathConstants.pathKeySet())` passing **bare** data IDs (`"plugin"`, `"selector"`, `"rule"`, `"auth"`, `"meta"`, `"proxy.selector"`, `"discovery"`) as `interestedKeyPrefixes`. Apollo's `AbstractConfig.isConfigChangeListenerInterested` checks `changedKey.startsWith(prefix)`. Actual property keys are namespace-prefixed (`namespaceId + "." + dataId + "." + ...`, e.g. `649330b6-….plugin.pluginName`) per `AbstractNodeDataSyncService:86-96`, so `startsWith("plugin")` is **false** — the listener is never notified for incremental changes. Even if notified, the handler body checks `changeKey.indexOf(PLUGIN_DATA_ID) == 0`, which also fails for namespaced keys. Startup loading via `getProperty` still works; only incremental changes are dropped. The unit tests bypass Apollo's filtering by invoking the captured listener directly with unrealistic keys.
   
   ## Location
   - `shenyu-sync-data-center/shenyu-sync-data-apollo/src/main/java/org/apache/shenyu/sync/data/apollo/ApolloDataService.java:102-144` (handler), `:150` (registration)
   - `shenyu-common/src/main/java/org/apache/shenyu/common/constant/ApolloPathConstants.java:37-67`
   - `shenyu-sync-data-center/shenyu-sync-data-api/src/main/java/org/apache/shenyu/sync/data/core/AbstractNodeDataSyncService.java:86-96` (namespaced keys)
   
   ## Impact
   After initial startup load, ALL incremental Apollo change events (plugin/selector/rule/meta/auth/proxy/discovery) are silently dropped. The gateway never receives any config change until full restart. Apollo sync is effectively static-only. Security-relevant changes (auth/plugin disable) won't apply until restart.
   
   ## Suggested fix
   Register prefixes that include the namespace prefix (e.g. `namespaceId + "." + PLUGIN_DATA_ID`), and change the handler `indexOf==0` checks to `changeKey.startsWith(namespaceId + "." + PLUGIN_DATA_ID)`; add an integration test that flows through Apollo's real filtering.
   
   ## Related existing
   None — filed Apollo items concern long-polling/websocket, not Apollo prefix matching.
   


-- 
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: notifications-unsubscribe@shenyu.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] [BUG] Apollo incremental change events silently dropped (bare data-ID prefixes vs namespace-prefixed keys) [shenyu]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on issue #6838:
URL: https://github.com/apache/shenyu/issues/6838#issuecomment-5174046407

   👋 Hello @Aias00
   
   A new issue has been opened by @Aias00:
   - **Title**: [BUG] Apollo incremental change events silently dropped (bare data-ID prefixes vs namespace-prefixed keys)
   - **Link**: https://github.com/apache/shenyu/issues/6838
   
   Please review when you have time. Thank you! 🙏


-- 
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: notifications-unsubscribe@shenyu.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] [BUG] Apollo incremental change events silently dropped (bare data-ID prefixes vs namespace-prefixed keys) [shenyu]

Posted by "Aias00 (via GitHub)" <gi...@apache.org>.
Aias00 closed issue #6838: [BUG] Apollo incremental change events silently dropped (bare data-ID prefixes vs namespace-prefixed keys)
URL: https://github.com/apache/shenyu/issues/6838


-- 
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: notifications-unsubscribe@shenyu.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] [BUG] Apollo incremental change events silently dropped (bare data-ID prefixes vs namespace-prefixed keys) [shenyu]

Posted by "wy471x (via GitHub)" <gi...@apache.org>.
wy471x commented on issue #6838:
URL: https://github.com/apache/shenyu/issues/6838#issuecomment-5389033758

   /assign


-- 
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: notifications-unsubscribe@shenyu.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org