biulebiu opened a new pull request, #503:
URL: https://github.com/apache/rocketmq-dashboard/pull/503

     ## What is the purpose of the change
     Fixes #239. On the Message page, querying a topic by time can display the 
same message twice. `queryMessageByTopic` accumulates pulled messages with 
`addAll` without deduplicating by msgId; when the same queue
     is enumerated under different broker names (stale route after a brokerName 
change, proxy re-registration, etc.), the same message is pulled twice.
   
     ## Brief changelog
     - `MessageServiceImpl#queryMessageByTopic`: deduplicate the result list by 
`msgId` (order-preserving `LinkedHashMap`) before returning.
     - Add unit test 
`MessageServiceImplTest#testQueryMessageByTopicDeduplicatesByMsgId`.
   
     ## Verifying this change
     `mvn test 
-Dtest='MessageServiceImplTest#testQueryMessageByTopicDeduplicatesByMsgId'`
     - Before fix: fails with `expected:<1> but was:<2>`
     - After fix: `Tests run: 1, Failures: 0`
     Existing `testQueryMessageByTopic` / 
`testQueryMessageByTopicWithOutOfRangeTimestamps` still pass.


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