You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@rocketmq.apache.org by "Aias00 (via GitHub)" <gi...@apache.org> on 2026/07/23 08:17:44 UTC

[PR] [ISSUE #10577] Keep reentrant POP receives broker sticky [rocketmq]

Aias00 opened a new pull request, #10652:
URL: https://github.com/apache/rocketmq/pull/10652

   ## Summary
   
   Fixes #10577.
   
   This change keeps reentrant orderly POP receive requests broker-sticky when the request carries an `attemptId`.
   
   ## Motivation
   
   Reentrant orderly POP depends on broker-local order state. If a retry with the same `attemptId` asks for a specific broker but the selector silently falls back to another broker, the retry can lose access to the original broker-local `OrderInfo` and leave the FIFO queue blocked until invisible time expires.
   
   ## Changes
   
   - Pass a broker-sticky flag into `ReceiveMessageQueueSelector` only for FIFO receive requests carrying `attemptId`.
   - When sticky mode is enabled and the requested broker is unavailable, return `null` instead of falling back to another broker.
   - Preserve the existing fallback behavior for non-sticky receive requests.
   - Extend `ReceiveMessageActivityTest` to cover both fallback and sticky-missing-broker behavior.
   
   ## Verification
   
   ```text
   mvn -pl proxy -Dtest=ReceiveMessageActivityTest test \
     -DfailIfNoTests=false -Djacoco.skip=true \
     -Dspotbugs.skip=true -Dcheckstyle.skip=true -Drat.skip=true
   
   Tests run: 9, Failures: 0, Errors: 0, Skipped: 0
   BUILD SUCCESS
   ```
   
   ```text
   mvn -pl proxy -DskipTests -Dspotbugs.skip=true -Drat.skip=true compile
   
   Checkstyle violations: 0
   BUILD SUCCESS
   ```
   
   `git diff --check` is clean.
   


-- 
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 #10577] Keep reentrant POP receives broker sticky [rocketmq]

Posted by "Aias00 (via GitHub)" <gi...@apache.org>.
Aias00 commented on PR #10652:
URL: https://github.com/apache/rocketmq/pull/10652#issuecomment-5293621131

   Rebased onto current `develop` and revalidated `ReceiveMessageActivityTest`. The previous macOS CI failure will now rerun on the refreshed, already-approved branch.


-- 
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 #10577] Keep reentrant POP receives broker sticky [rocketmq]

Posted by "codecov-commenter (via GitHub)" <gi...@apache.org>.
codecov-commenter commented on PR #10652:
URL: https://github.com/apache/rocketmq/pull/10652#issuecomment-5056292015

   ## [Codecov](https://app.codecov.io/gh/apache/rocketmq/pull/10652?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 `2 lines` in your changes missing coverage. Please review.
   :white_check_mark: Project coverage is 48.24%. Comparing base ([`577b89f`](https://app.codecov.io/gh/apache/rocketmq/commit/577b89f2cdddf0d42cfd3c1b6effdac0cd0e467c?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)) to head ([`969df6e`](https://app.codecov.io/gh/apache/rocketmq/commit/969df6ebbe62ba95852e03395de85830b12ac063?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/10652?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | Patch % | Lines |
   |---|---|---|
   | [...proxy/grpc/v2/consumer/ReceiveMessageActivity.java](https://app.codecov.io/gh/apache/rocketmq/pull/10652?src=pr&el=tree&filepath=proxy%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Frocketmq%2Fproxy%2Fgrpc%2Fv2%2Fconsumer%2FReceiveMessageActivity.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-cHJveHkvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL3JvY2tldG1xL3Byb3h5L2dycGMvdjIvY29uc3VtZXIvUmVjZWl2ZU1lc3NhZ2VBY3Rpdml0eS5qYXZh) | 75.00% | [1 Missing and 1 partial :warning: ](https://app.codecov.io/gh/apache/rocketmq/pull/10652?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   #10652      +/-   ##
   =============================================
   - Coverage      48.32%   48.24%   -0.09%     
   + Complexity     13490    13467      -23     
   =============================================
     Files           1380     1380              
     Lines         101031   101037       +6     
     Branches       13092    13095       +3     
   =============================================
   - Hits           48825    48741      -84     
   - Misses         46247    46314      +67     
   - Partials        5959     5982      +23     
   ```
   </details>
   
   [:umbrella: View full report in Codecov by Harness](https://app.codecov.io/gh/apache/rocketmq/pull/10652?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 #10577] Keep reentrant POP receives broker sticky [rocketmq]

Posted by "Aias00 (via GitHub)" <gi...@apache.org>.
Aias00 commented on PR #10652:
URL: https://github.com/apache/rocketmq/pull/10652#issuecomment-5082340212

   Addressed the review feedback in `a998906f3`:
   
   - Documented the broker-sticky null-return contract in `ReceiveMessageQueueSelector` Javadoc.
   - Added a call-site comment clarifying that reentrant FIFO POP must stay on the original broker instead of falling back.
   - Added coverage for FIFO receive with `attemptId` to verify the sticky selector is passed into `popMessage` and returns no queue when the original broker is unavailable.
   
   Local verification:
   `mvn -pl proxy -Dtest=ReceiveMessageActivityTest test` passed with 10 tests; `git diff --check` passed.


-- 
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 #10577] Keep reentrant POP receives broker sticky [rocketmq]

Posted by "Aias00 (via GitHub) via commits" <co...@rocketmq.apache.org>.
Aias00 closed pull request #10652: [ISSUE #10577] Keep reentrant POP receives broker sticky
URL: https://github.com/apache/rocketmq/pull/10652


-- 
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