You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[BUG] AbstractNodeDataChangedListener.onCommonChanged REFRESH stale-removal guarded by size> instead of diff — stale entries persist when |old|<=|new| #6875
onSelectorChanged does SelectorData selectorData = changed.stream().findFirst().orElseThrow(...); String configKeyPrefix = selectorData.getNamespaceId() + JOIN_POINT + changeData.getSelectorDataId() + JOIN_POINT; — using getNamespaceId() directly with no null-default. Every sibling handler (onAppAuthChanged:73-75, onPluginChanged:84-86, onMetaDataChanged:95-97, onRuleChanged:187-189, onProxySelectorChanged:276-278, onDiscoveryUpstreamChanged:287-289) wraps the value with StringUtils.defaultString(value.getNamespaceId(), SYS_DEFAULT_NAMESPACE_ID) before building the prefix. If a SelectorData arrives with null namespaceId, the prefix becomes the literal "null.selector." instead of "<default-namespace>.selector.". The gateway-side nacos/apollo reader builds keys with the configured namespace id, so it reads "<default>.selector." and never sees the entries written under "null.selector." — selectors silently invisible to the gateway.
Latent: any selector with a null namespaceId (partial config, legacy data, or a future code path that forgets to set it) is published under a wrong config key on nacos/apollo/polaris and is invisible to gateways, causing those routes to vanish while admin shows them as registered. The sibling methods defend against exactly this; selector alone does not.
Suggested fix
Replace selectorData.getNamespaceId() at line 177 with StringUtils.defaultString(selectorData.getNamespaceId(), SYS_DEFAULT_NAMESPACE_ID) (and use the same streaming pattern as siblings to be consistent).
Related existing
None — distinct from CLI-2 (#6664, client-side new-registrar never propagates namespaceId) and CLI-3 (rpcExt case mismatch). This is admin-side config-key construction for selector publish on node-based backends.
Title: [BUG] AbstractNodeDataChangedListener.onCommonChanged REFRESH stale-removal guarded by size> instead of diff — stale entries persist when |old|<=|new|
Closing as resolved. The stale REFRESH removal defect named in the title was fixed by #7014, while the null selector namespace defect described in the body was fixed by #7010 and covered by the regression test in #7359.
Activity
github-actions commentedon Aug 4, 2026
👋 Hello @Aias00
A new issue has been opened by @Aias00:
Please review when you have time. Thank you! 🙏
zhang-arvin commentedon Aug 30, 2026
I will work on this.
[type: bug] Fix stale config cleanup on REFRESH/MYSELF events (apache…
Related to #6875: Cover default selector namespace in node listeners (#…
Aias00 commentedon Oct 1, 2026
Closing as resolved. The stale REFRESH removal defect named in the title was fixed by #7014, while the null selector namespace defect described in the body was fixed by #7010 and covered by the regression test in #7359.