BobSong-dev opened a new pull request, #7337: URL: https://github.com/apache/shenyu/pull/7337
## What happened Concurrent requests in the same legacy MCP session could reuse session-level transport state and associate an exchange or response with the wrong JSON-RPC request. This could cause missing results, mismatched IDs, or failures in one request affecting later requests. ## Changes - Propagate the current request exchange through the MCP transport context for each session request. - Correlate responses by JSON-RPC request ID instead of clearing shared session state. - Remove the unsafe cached session queue behavior and clean response/session state on completion, error, and cancellation. - Keep the legacy callback holder as a compatibility fallback while preferring request-scoped context. - Add regression coverage for interleaved requests, cancellation isolation, error recovery, response cleanup, and callback context selection. ## Verification - Windows JDK 17, Maven Wrapper, targeted MCP reactor: 11 modules, BUILD SUCCESS. - MCP server tests: 94/94 passed; failures 0, errors 0, skipped 0. - Checkstyle: 0 violations. - The branch is based directly on the current Apache master baseline and does not depend on the Agent Gateway PR or the separate AI Proxy cancellation change. -- 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]
