You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@rocketmq.apache.org by "f1amingo (via GitHub)" <gi...@apache.org> on 2026/09/28 08:55:19 UTC
[PR] [ISSUE #11250] Fix Lite topic ack re-dispatching the event while holding the pop lock [rocketmq]
f1amingo opened a new pull request, #11251:
URL: https://github.com/apache/rocketmq/pull/11251
### Which Issue(s) This PR Fixes
- Fixes #11250
### Brief Description
When acking a lite message, the broker re-dispatched the lite topic while still holding its pop lock. A pop that took the re-dispatched event before the lock was released failed to acquire the lock and skipped the lite topic, and the event was already consumed, so the remaining messages could stay undelivered.
This PR keeps the offset commit and the block check under the lock, and performs the dispatch after the lock is released. A dispatch that turns out to be stale is harmless: the pop reads 0 messages or finds the lite topic FIFO-blocked.
### How Did You Test This Change?
Added `testAckLite_dispatchAfterUnlock` to `AckMessageProcessorTest`, which asserts the pop lock can be acquired when the ack dispatches; it fails on the current code and passes with the fix. `AckMessageProcessorTest`, `PopLiteMessageProcessorTest`, `PopLiteMessageProcessorEventLossTest` and `LiteEventDispatcherTest` pass.
--
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 #11250] Fix Lite topic ack re-dispatching the event while holding the pop lock [rocketmq]
Posted by "codecov-commenter (via GitHub)" <gi...@apache.org>.
codecov-commenter commented on PR #11251:
URL: https://github.com/apache/rocketmq/pull/11251#issuecomment-5867121757
## [Codecov](https://app.codecov.io/gh/apache/rocketmq/pull/11251?dropdown=coverage&src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) Report
:x: Patch coverage is `75.00000%` with `1 line` in your changes missing coverage. Please review.
:white_check_mark: Project coverage is 49.60%. Comparing base ([`78b96bc`](https://app.codecov.io/gh/apache/rocketmq/commit/78b96bc5e21216cd7896efae08f90c5cde4cae53?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)) to head ([`eed78c5`](https://app.codecov.io/gh/apache/rocketmq/commit/eed78c5a320593dcc6cd84e9f58a567a1575a695?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)).
| [Files with missing lines](https://app.codecov.io/gh/apache/rocketmq/pull/11251?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | Patch % | Lines |
|---|---|---|
| [...rocketmq/broker/processor/AckMessageProcessor.java](https://app.codecov.io/gh/apache/rocketmq/pull/11251?src=pr&el=tree&filepath=broker%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Frocketmq%2Fbroker%2Fprocessor%2FAckMessageProcessor.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-YnJva2VyL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9yb2NrZXRtcS9icm9rZXIvcHJvY2Vzc29yL0Fja01lc3NhZ2VQcm9jZXNzb3IuamF2YQ==) | 75.00% | [0 Missing and 1 partial :warning: ](https://app.codecov.io/gh/apache/rocketmq/pull/11251?src=pr&el=tree&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 #11251 +/- ##
=============================================
- Coverage 49.74% 49.60% -0.14%
+ Complexity 14351 14305 -46
=============================================
Files 1390 1390
Lines 103190 103193 +3
Branches 13493 13494 +1
=============================================
- Hits 51333 51192 -141
- Misses 45691 45796 +105
- Partials 6166 6205 +39
```
</details>
[:umbrella: View full report in Codecov by Harness](https://app.codecov.io/gh/apache/rocketmq/pull/11251?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 #11250] Fix Lite topic ack re-dispatching the event while holding the pop lock [rocketmq]
Posted by "RongtongJin (via GitHub)" <gi...@apache.org>.
RongtongJin merged PR #11251:
URL: https://github.com/apache/rocketmq/pull/11251
--
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