Aias00 opened a new issue, #8004: URL: https://github.com/apache/shenyu/issues/8004
### Describe the bug `#7986` replaced the `countMap`-based bookkeeping in `LeastActiveLoadBalancer` with a read of `Upstream.getInflight()`, which is the right model: inflight is now the single source of truth and is maintained by `DividePlugin` (and the retry attempts in `DefaultRetryStrategy`). The problem is that `LoadbalancerUtils` is not only used by `DividePlugin`. It is also used by: - `WebSocketPlugin` - `ApacheDubboProxyService` / `ApacheDubboGrayLoadBalance` Those call sites never increment or decrement `getInflight()`. As a result, under `leastActive`, every upstream keeps `inflight == 0` for them and the selection degenerates to weighted random — which is a regression compared with the old behaviour, where the previous implementation at least accumulated selection counts. `shortestResponse` has the same dependency on `getInflight()` and therefore the same gap. ### Expected behavior Either: 1. maintain inflight around the request for these plugins as well (increment before forwarding, release in `doFinally`, mirroring `DividePlugin`), or 2. document in the load balancer docs / RELEASE-NOTES that `leastActive` and `shortestResponse` are only meaningful for the `divide` plugin, so the degradation is explicit rather than silent. ### Affected modules - `shenyu-plugin-websocket` - `shenyu-plugin-apache-dubbo` - `shenyu-loadbalancer` (`LeastActiveLoadBalancer`, `ShortestResponseLoadBalancer`) ### Additional context Raised while reviewing `#7986` (merged). Not a blocker for that PR — the inflight model itself is correct — but it should be tracked so the degradation is not forgotten. -- 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]
