Skip to content

[ISSUE #10768] Continue queryRoute after missing broker data - #10769

Open
Aias00 wants to merge 1 commit into
apache:developfrom
Aias00:fix/proxy-query-route-skip-missing-broker
Open

[ISSUE #10768] Continue queryRoute after missing broker data#10769
Aias00 wants to merge 1 commit into
apache:developfrom
Aias00:fix/proxy-query-route-skip-missing-broker

Conversation

@Aias00

@Aias00 Aias00 commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

What changed

This PR makes Proxy gRPC RouteActivity#queryRoute skip only the malformed queue row when its broker name is absent from the built broker map.

Previously the loop used break, so one stale/malformed QueueData entry could stop processing later valid queue rows and truncate the route response.

Why

A missing broker mapping should not hide valid queue routes that appear later in the same route data. This can affect gRPC route discovery when route metadata contains stale queue data.

Fixes #10768.

Verification

mvn -pl proxy -Dtest=RouteActivityTest test

Result: BUILD SUCCESS. RouteActivityTest ran 8 tests with 0 failures/errors/skips. Checkstyle and SpotBugs also passed in the Maven run.

Copilot AI review requested due to automatic review settings August 3, 2026 06:29

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR fixes Proxy gRPC route discovery so RouteActivity#queryRoute continues iterating through all QueueData entries even when a queue row references a broker name that’s missing from the built broker map, preventing later valid queues from being omitted.

Changes:

  • Change queryRoute behavior on missing broker mapping from break to continue so only the malformed queue row is skipped.
  • Add a regression test covering “missing broker queue row before valid queue row” to ensure valid queues still appear in the response.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
proxy/src/main/java/org/apache/rocketmq/proxy/grpc/v2/route/RouteActivity.java Fixes route-building loop to skip only malformed queue rows with missing broker mappings.
proxy/src/test/java/org/apache/rocketmq/proxy/grpc/v2/route/RouteActivityTest.java Adds a regression test ensuring later valid queues are still returned after a missing-broker queue row.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@RockteMQ-AI RockteMQ-AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review by github-manager-bot

Summary

One-line fix: changes to in when a entry references a broker name absent from the built broker map. Previously, a single stale/malformed queue row would truncate the entire route response by breaking out of the loop.

Findings

  • [Correctness] — The fix is correct. A missing broker mapping should not prevent processing of subsequent valid entries. The previous behavior could silently drop valid routes from the response.
  • [Tests] — Good test coverage. verifies that a missing broker in the middle of the queue data list does not prevent later valid entries from being included in the response.

Verdict

Clean, minimal fix with appropriate test coverage. LGTM.


Automated review by github-manager-bot

@codecov-commenter

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 48.26%. Comparing base (eddb235) to head (e883802).

Additional details and impacted files
@@              Coverage Diff              @@
##             develop   #10769      +/-   ##
=============================================
+ Coverage      48.24%   48.26%   +0.02%     
- Complexity     13496    13497       +1     
=============================================
  Files           1380     1380              
  Lines         101104   101104              
  Branches       13107    13107              
=============================================
+ Hits           48773    48794      +21     
+ Misses         46350    46334      -16     
+ Partials        5981     5976       -5     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug] Proxy gRPC queryRoute stops processing queues after a missing broker entry

4 participants