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

   ## Current behavior
   
   `collectStateData` aggregates all instances into a `stateHistoryMap` keyed 
only by state. `getInstanceDataVisual(namespaceId)` filters the pie-chart 
counts by namespace but reads the global history map for line-chart data. 
Selecting namespace A therefore shows A-only current counts beside a history 
containing B and other namespaces.
   
   Reproduction: add distinct populations in namespaces A and B, collect one 
scheduled sample, then request `/instance/analysis/A` and 
`/instance/analysis/B`. Historical counts should follow the selected namespace 
but currently share the same data.
   
   ## Acceptance criteria
   - [ ] Keep bounded history per namespace/state, with explicit behavior for 
any supported aggregate view.
   - [ ] Sample once per check cycle, preserving the fix for #6497.
   - [ ] Test A/B independence, empty namespaces and consistent line/pie 
populations.
   - [ ] Bound history retention and namespace cleanup.
   
   Related: #6497 fixed sampling frequency; this is a separate 
namespace-scoping defect. Namespace visibility implications have not been 
tested as a security exploit.
   
   ## Source evidence
   
   [Reviewed 
source](https://github.com/apache/shenyu/blob/b4e115367fd57adc8aba332d655b1009932ba394/shenyu-admin/src/main/java/org/apache/shenyu/admin/service/impl/InstanceCheckService.java#L213).
 Baseline: `b4e115367fd57adc8aba332d655b1009932ba394`. Report based on source 
inspection; no runtime reproduction was executed during issue preparation.
   


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