RockteMQ-AI commented on issue #10419:
URL: https://github.com/apache/rocketmq/issues/10419#issuecomment-4689402604
**Issue Evaluation**
Category: `type/bug` | Status: **Confirmed**
The reported issue has been verified against the codebase description.
**Root Cause:** `PullAPIWrapper#computePullFromWhichFilterServer` directly
dereferences `topicRouteData` without null-checking. When the local topic route
table lacks an entry for the target topic, `topicRouteTable.get(topic)` returns
`null`, causing `NullPointerException` before reaching the intended
`MQClientException` fallback path.
**Impact:** Consumer pull operations with class filter enabled. When route
data is temporarily unavailable or missing, clients crash with NPE instead of
the graceful `MQClientException("Find Filter Server Failed...")` that the
method already provides for other error cases.
**Severity:** Medium — affects consumer stability in edge cases where topic
route data is incomplete or stale.
**Suggested Fix:** Add null-check for `topicRouteData` before accessing
`getFilterServerTable()`. If null, fall through to the existing
`MQClientException` throw, maintaining consistency with the method's error
handling contract.
```java
TopicRouteData topicRouteData = topicRouteTable.get(topic);
if (topicRouteData == null) {
throw new MQClientException("Find Filter Server Failed, Broker Addr: " +
brokerAddr + " topic: " + topic, null);
}
```
An automated fix proposal can be generated. Reply `/approve` to proceed with
PR generation.
---
*Automated evaluation by RockteMQ-AI*
--
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]