pilichoumao opened a new pull request, #6604: URL: https://github.com/apache/rocketmq-dashboard/pull/6604
Fixes #6534. Refs #4876 (a separate session-ID recovery decision in the same file). An MCP call whose context expires can remain blocked behind another call's pending reconnect or long HTTP operation: `sync.RWMutex` acquisition in `sendWithReconnect` and `reinitialize` does not observe the per-message context. The call returns only after the unrelated operation releases the lock. Use an internal FIFO reader/writer gate whose queued waits observe both the request context and session close. Ordinary sends remain concurrent; a queued reconnect prevents later readers from overtaking its exclusive initialize/initialized exchange. Cancelled waiters are removed, and a permit granted concurrently with cancellation is returned before reporting the error. Existing generation checks, retry bounds and handshake-failure recovery remain in place. No dependency or public API changes. Document the timeout boundary in the agent architecture notes. ### Validation Base: `rocketmq-studio` at `779b8c0e7aed2396d3cc72743dcd544ea48e9ae6`. - Both Session-level deadline regressions fail on original production code on macOS. On Linux ECS, each fails in three consecutive runs while the unrelated HTTP operation remains held open; the healthy operation succeeds when released. - Linux: new gate/Session regressions repeated ten times under the race detector. They cover overlapping readers, FIFO reconnects, reader batching, removal of a cancelled writer, cancellation immediately after a grant (100 iterations for each mode per run), configured request/notification timeouts and closing a session with queued callers. - macOS and Linux: `make -C rmqctl ci` passes: formatting, all Go tests with race detection, catalog verification, vet, all six Darwin/Linux/Windows builds and per-binary license-material verification. - The Session regressions use the real SDK Streamable HTTP transport with a controlled HTTP boundary. No live broker or deployed Studio Server is claimed; this change is confined to client synchronization. ### Review status Draft for maintainer feedback on the internal admission design, following CONTRIBUTING's non-trivial design guidance. The implementation and verification are complete; it is not intended to land before that review. -- 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]
