123123213weqw opened a new pull request, #695:
URL: https://github.com/apache/rocketmq-dashboard/pull/695

   ### Motivation
   
   Fixed three real bugs found while reviewing the code:
   
   1. **DashboardCollectTask: broker stats retry never actually retried**
      In `fetchBrokerRuntimeStats`, the recursive retry call's result was 
discarded and the original exception re-thrown, so a single failed fetch 
aborted the whole `collectBroker` scheduled task instead of retrying up to 
`retryTime` times. The caller already handles a `null` result by skipping the 
broker.
   
   2. **MessageServiceImpl: NPE when `taskId` is blank in `queryMessageByPage`**
      `Cache.getIfPresent(query.getTaskId())` throws `NullPointerException` 
when the request body has no `taskId`. The API documents `taskId` as optional, 
so this endpoint 500s on valid input. A taskId is now generated when blank and 
reused consistently for the cache key and response.
   
   3. **AuthInterceptor: user info in ThreadLocal is never cleared**
      `LoginServiceImpl` writes the logged-in user into `UserInfoContext` (a 
`ThreadLocal`) but nothing ever calls `UserInfoContext.clear()`. Since Tomcat 
reuses worker threads, the previous request's user info can leak into the next 
request handled by the same thread. Added `afterCompletion` to clear it.
   
   ### Verification
   
   `mvn compiler:compile` passes (`BUILD SUCCESS`) after the changes.
   
   ### Diff
   
   3 files changed, +16 / -6.


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