RockteMQ-AI commented on issue #1358:
URL: 
https://github.com/apache/rocketmq-clients/issues/1358#issuecomment-5524060075

   **Issue Evaluation**
   
   Category: `bug` | Status: **Confirmed**
   
   The `lostcancel` findings from `go vet` are valid. Discarding the cancel 
function from `context.WithTimeout()` causes:
   
   1. **Timer leak (11 unary RPCs + dial):** Each call leaks the timeout timer 
until the deadline expires. Under high call rates (send/heartbeat/ack), this 
accumulates unnecessary pending timers.
   2. **Telemetry stream disruption:** The per-call timeout kills the cached 
bidirectional stream every `timeout` interval, forcing periodic teardown and 
rebuild — a behavioral bug beyond just a resource leak.
   
   **Root Cause:** `ctx, _ = context.WithTimeout(ctx, duration)` pattern in 
`client_manager.go` (11 unary wrappers), `conn.go` (dial), and `Telemetry` 
stream setup.
   **Impact:** Resource leak under load; Telemetry stream instability; CI 
failure if `go vet` is enabled.
   **Severity:** high (affects production stability under load, Telemetry 
correctness)
   
   The proposed fix (`defer cancel()` for unary RPCs, removing per-call timeout 
on persistent Telemetry stream) is correct and aligns with how `ReceiveMessage` 
handles its context.
   
   ---
   *Automated evaluation by github-manager*


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