X-LightYear opened a new issue, #5128:
URL: https://github.com/apache/rocketmq-dashboard/issues/5128

   ## Problem
   
   ProxyConsumerResolver caches discovered Proxy remoting addresses for 60 
seconds using only the Studio instanceId. When an Apache instance is edited to 
use a different NameServer endpoint, InstanceService releases the old RocketMQ 
admin/client connections, but the resolver cache is not invalidated.
   
   During the remaining cache lifetime, consumer diagnostics can continue 
querying Proxy addresses discovered from the old endpoint.
   
   ## Reproduction
   
   1. Configure an Apache instance named instance-a with endpoint A and a Proxy 
reachable through A.
   2. Open a consumer diagnostic path that discovers and caches the Proxy 
address for instance-a.
   3. Edit instance-a to use endpoint B, where the heartbeat-syncer reports a 
different Proxy address.
   4. Request the same consumer diagnostic before the 60-second Proxy address 
TTL expires.
   
   A deterministic regression test on upstream commit 0228dad5b models the same 
lifecycle: the active admin target changes from endpoint A to endpoint B while 
the instance name remains instance-a.
   
   ## Expected behavior
   
   After an instance endpoint change, the next Proxy discovery for that 
instance should query the new endpoint and return only addresses observed from 
the new endpoint.
   
   ## Actual behavior
   
   The resolver returns the cached address from endpoint A and does not query 
endpoint B until the 60-second TTL expires.
   
   ## Root cause
   
   ProxyConsumerResolver.proxyAddressCache is keyed by instance ID and has no 
invalidation hook. InstanceService.releaseOldClientIfUnused releases the old 
admin/client pool entries after endpoint changes or deletion, but does not 
evict the matching Proxy address cache entry.
   
   ## Scope
   
   Invalidate the Proxy address cache for the affected Apache instance when its 
endpoint/connection identity changes or the instance is deleted. No API 
contract change is required.
   
   ## Regression evidence
   
   
ProxyConsumerResolverTest.discoverProxyAddressesShouldRefreshAfterInstanceEndpointChangesTest
 fails on the current upstream code:
   
   - expected after the simulated endpoint change: 10.0.2.20:8080
   - actual: stale 10.0.1.10:8080


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