unbridled-41 commented on PR #10994:
URL: https://github.com/apache/rocketmq/pull/10994#issuecomment-5468009094

   ### Test evidence (before → after)
   
   
`PopLongPollingServiceTest#testNotifyMessageArrivingFromRetryWithoutProperties` 
was verified in both directions on JDK 8 (`mvn -pl broker test 
-Dtest=PopLongPollingServiceTest`):
   
   **On the unfixed code** (fix reverted, test kept):
   
   ```
   java.lang.NullPointerException: Cannot invoke "java.util.Map.get(Object)" 
because "properties" is null
        at 
...PopLongPollingServiceTest.testNotifyMessageArrivingFromRetryWithoutProperties
     → invoked via notifyMessageArrivingWithRetryTopic → 
notifyMessageArrivingFromRetry("%RETRY%group", ...)
   Tests run: 1, Failures: 0, Errors: 1, Skipped: 0
   ```
   
   That is exactly the NPE the reput thread hits: 
`DefaultMessageStore.ReputMessageService#doReput` only catches 
`RocksDBException`, and the exception is thrown **before** `reputFromOffset` is 
advanced, so `ServiceThread.run` logs and re-reads the same commitlog record 
forever — broker-wide dispatch stall from a single properties-less message on a 
`%RETRY%` topic.
   
   **With this PR**: `Tests run: 12, Failures: 0, Errors: 0, Skipped: 0` (11 
pre-existing + 1 new; the test also verifies via `never()` that no wake-up is 
attempted for a null-properties retry message).
   
   For consistency reference: 
`DefaultMessageStore#notifyMessageArrive4MultiQueue` guards `prop == null` and 
`PullRequestHoldService#notifyMessageArriving` guards `properties != null` — 
this PR adds the same guard to the pop retry branch, it does not introduce a 
new pattern.
   
   Side note on CI: the workflow runs for this PR are in `action_required` 
state (first-time contributor) and will start once a maintainer approves them.


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

Reply via email to