ai-yang opened a new pull request, #10697:
URL: https://github.com/apache/rocketmq/pull/10697
### Which Issue(s) This PR Fixes
- Fixes #10696
### Brief Description
The asynchronous request-reply overloads register a `RequestResponseFuture`
before invoking the underlying send method. When send initiation throws
synchronously, the exception reaches the caller but the future remains in
`RequestFutureHolder` until timeout processing, which retains request state and
can deliver a callback after the synchronous failure.
This change:
- removes the exact registered future when `sendDefaultImpl`,
`sendSelectImpl`, or `sendKernelImpl` does not return normally;
- uses `remove(correlationId, requestResponseFuture)` so a concurrent
replacement under the same key is not removed;
- preserves the future after a normal asynchronous handoff so reply,
send-failure, and timeout paths continue to own completion;
- updates the existing synchronous-exception test semantics and adds
regression coverage for the default, selector, and explicit-queue callback
overloads.
### How Did You Test This Change?
- Confirmed the new regression assertion fails before the production fix
because the correlation ID remains in `requestFutureTable`.
- Ran the two affected test classes:
```text
Tests run: 77, Failures: 0, Errors: 0, Skipped: 0
```
- Ran the complete `client` reactor with dependencies:
```bash
mvn -pl client -am -Dsurefire.failIfNoSpecifiedTests=false test
```
```text
Tests run: 995, Failures: 0, Errors: 0, Skipped: 1
```
- Ran the repository-configured validation lifecycle:
```bash
mvn -pl client -am -DskipTests validate
```
- Ran `git diff --check` successfully.
--
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]