You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@rocketmq.apache.org by "ai-yang (via GitHub)" <gi...@apache.org> on 2026/08/02 13:21:51 UTC
[PR] [ISSUE #10747] Fix InvokeCallback completion order [rocketmq]
ai-yang opened a new pull request, #10753:
URL: https://github.com/apache/rocketmq/pull/10753
## Summary
- invoke `operationSucceed` or `operationFail` before `operationComplete`, as required by the `InvokeCallback` contract
- keep invocation failures separate from exceptions thrown by user callback code
- preserve unwrapping of the original remoting failure
- add deterministic success, failure, ordering, and callback-exception regressions
## Root cause
`invokeAsyncImpl` chained `whenComplete`, `thenAccept`, and `exceptionally`. That made `operationComplete` run first and allowed exceptions from callback methods to flow into the invocation-failure stage.
The fix handles the original invocation result in one terminal `whenComplete` callback and invokes final completion in `finally`.
## Validation
- affected callback regressions: 20 isolated JDK 8 Maven processes, 5/5 each (100/100)
- full remoting reactor
- full common reactor
- full client reactor
- Checkstyle
- SpotBugs
- Maven validate
- `git diff --check`
Fixes #10747
--
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: commits-unsubscribe@rocketmq.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [ISSUE #10747] Fix InvokeCallback completion order [rocketmq]
Posted by "ai-yang (via GitHub)" <gi...@apache.org>.
ai-yang commented on PR #10753:
URL: https://github.com/apache/rocketmq/pull/10753#issuecomment-5447349399
Status refresh (2026-08-28):
- Rebased the PR onto the latest upstream `develop` (`e348efa66`). New head: `4a6b17c6c`.
- The new upstream head includes #10576, which changes response-table removal in the same class. I rechecked the interaction: it addresses a different race and does not correct the `InvokeCallback` outcome/completion ordering fixed here.
- Re-ran the targeted remoting reactor on the rebased head:
`mvn -Dmaven.repo.local=/tmp/codex-maven-repository -pl remoting -am -DskipITs -Dtest=org.apache.rocketmq.remoting.netty.NettyRemotingClientTest -Dsurefire.failIfNoSpecifiedTests=false test`
Result: **BUILD SUCCESS**; 17 tests run, 0 failures, 0 errors. Checkstyle and SpotBugs also passed in the reactor.
The PR remains compatible with current `develop`, and no additional implementation changes were needed.
--
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: commits-unsubscribe@rocketmq.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [ISSUE #10747] Fix InvokeCallback completion order [rocketmq]
Posted by "codecov-commenter (via GitHub)" <gi...@apache.org>.
codecov-commenter commented on PR #10753:
URL: https://github.com/apache/rocketmq/pull/10753#issuecomment-5447536286
## [Codecov](https://app.codecov.io/gh/apache/rocketmq/pull/10753?dropdown=coverage&src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) Report
:white_check_mark: All modified and coverable lines are covered by tests.
:white_check_mark: Project coverage is 48.50%. Comparing base ([`e348efa`](https://app.codecov.io/gh/apache/rocketmq/commit/e348efa66b08eb645ee123706ea6492fa9a3ad35?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)) to head ([`4a6b17c`](https://app.codecov.io/gh/apache/rocketmq/commit/4a6b17c6c095ed1ba2d0b9bbd0c6dc7195aaed6f?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)).
<details><summary>Additional details and impacted files</summary>
```diff
@@ Coverage Diff @@
## develop #10753 +/- ##
=============================================
- Coverage 48.58% 48.50% -0.08%
+ Complexity 13676 13648 -28
=============================================
Files 1381 1381
Lines 101475 101479 +4
Branches 13190 13191 +1
=============================================
- Hits 49299 49220 -79
- Misses 46174 46246 +72
- Partials 6002 6013 +11
```
</details>
[:umbrella: View full report in Codecov by Harness](https://app.codecov.io/gh/apache/rocketmq/pull/10753?dropdown=coverage&src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).
:loudspeaker: Have feedback on the report? [Share it here](https://about.codecov.io/codecov-pr-comment-feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).
<details><summary> :rocket: New features to boost your workflow: </summary>
- :snowflake: [Test Analytics](https://docs.codecov.com/docs/test-analytics): Detect flaky tests, report on failures, and find test suite problems.
</details>
--
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: commits-unsubscribe@rocketmq.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [ISSUE #10747] Fix InvokeCallback completion order [rocketmq]
Posted by "ai-yang (via GitHub)" <gi...@apache.org>.
ai-yang commented on PR #10753:
URL: https://github.com/apache/rocketmq/pull/10753#issuecomment-5463264883
All 10 CI checks are green on the refreshed single signed-off commit. @drpmma @aaron-ai, could you please take a human review when convenient? The key point is preserving the `InvokeCallback` contract that outcome callbacks run before `operationComplete`, including callback exceptions and the concurrent timeout/response race.
--
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: commits-unsubscribe@rocketmq.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org