You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@rocketmq.apache.org by "Crazylychee (via GitHub)" <gi...@apache.org> on 2025/03/29 06:30:34 UTC

[PR] [ISSUE #274] fix:Failed to find messages older than 3 days using message ID [rocketmq-dashboard]

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

   ## What is the purpose of the change
   
   fix #274 
   
   ## Brief changelog
   By examining the call stack of the method where the bug occurred, it was discovered that the method automatically adds a time window of 3 days. Messages older than 3 days couldn't be found.
   
   ![4bd8f3787c1a001f3599fb154891d41](https://github.com/user-attachments/assets/8fe6dd20-dc92-4e8a-82e0-6783b81bf547)
   
   Therefore, we decided to keep the existing cluster-name-based query design, but revert to the original implementation using reflection to call the queryMessage method (since the time-parameter-specific method isn't exposed in the interface, making reflection necessary).
   ## Verifying this change
   After the change,the bug is fixed
   ![58db88d64191966116bdfef07392688](https://github.com/user-attachments/assets/3c1b0bfc-a2cb-4a24-ac41-b619c5c2a650)
   
   ![e580a48c4002e337246abaf7fc3ef20](https://github.com/user-attachments/assets/88419062-4eb4-4d49-b9c9-e31a9111efcd)
   
   Follow this checklist to help us incorporate your contribution quickly and easily. Notice, `it would be helpful if you could finish the following 5 checklist(the last one is not necessary)before request the community to review your PR`.
   
   - [x] Make sure there is a [Github issue](https://github.com/apache/rocketmq/issues) filed for the change (usually before you start working on it). Trivial changes like typos do not require a Github issue. Your pull request should address just this issue, without pulling in other changes - one PR resolves one issue. 
   - [x] Format the pull request title like `[ISSUE #123] Fix UnknownException when host config not exist`. Each commit in the pull request should have a meaningful subject line and body.
   - [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why.
   - [x] Write necessary unit-test(over 80% coverage) to verify your logic correction, more mock a little better when cross module dependency exist. If the new feature or significant change is committed, please remember to add integration-test in [test module](https://github.com/apache/rocketmq/tree/master/test).
   - [x] Run `mvn -B clean apache-rat:check findbugs:findbugs checkstyle:checkstyle` to make sure basic checks pass. Run `mvn clean install -DskipITs` to make sure unit-test pass. Run `mvn clean test-compile failsafe:integration-test`  to make sure integration-test pass.
   - [ ] If this contribution is large, please file an [Apache Individual Contributor License Agreement](http://www.apache.org/licenses/#clas).
   


-- 
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: commits-unsubscribe@rocketmq.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [ISSUE #274] fix:Failed to find messages older than 3 days using message ID [rocketmq-dashboard]

Posted by "rolling-dad (via GitHub)" <gi...@apache.org>.
rolling-dad commented on PR #275:
URL: https://github.com/apache/rocketmq-dashboard/pull/275#issuecomment-2792305600

   环境: docker 部署 apache/rocketmq:5.3.2 , 同时使用 master 分支部署 rocketmq-dashboard .
   
   报错: Failed to query message by Id: C0A8487375AD18B4AAC231B017550000
   
   调试: MessageClientIDSetter.getNearlyTimeFromID(msgId).getTime() 解析后刚好是消息的 StoreTime 
   
   建议: 
   1. 查询时使用 >= beginTimestamp , 
   2. 或者使用 MessageClientIDSetter.getNearlyTimeFromID(msgId).getTime() - 1000 作为查询条件
   


-- 
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: commits-unsubscribe@rocketmq.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [ISSUE #274] fix:Failed to find messages older than 3 days using message ID [rocketmq-dashboard]

Posted by "Crazylychee (via GitHub)" <gi...@apache.org>.
Crazylychee commented on PR #275:
URL: https://github.com/apache/rocketmq-dashboard/pull/275#issuecomment-2792333724

   @rolling-dad I recently encountered this issue while using the dashboard. Simply using MessageClientIDSetter.getNearlyTimeFromID(msgId).getTime() or MessageClientIDSetter.getNearlyTimeFromID(msgId).getTime() - 1000 (subtracting a certain value) actually does not retrieve the message. The following image shows the query result using MessageClientIDSetter.getNearlyTimeFromID(msgId).getTime() - 1000.
   ![image](https://github.com/user-attachments/assets/33d3b759-e9e1-4ac6-8325-9867d8e5a22d)
   ![image](https://github.com/user-attachments/assets/687098a6-504d-46ae-97db-cb94b24e4e88)
   
   So, I am planning to expand the message query time range to start from 0L, which will allow retrieval of the details for all messages. I would appreciate your feedback on this approach. I apologize that this PR did not completely resolve the issue. I will submit a new PR shortly that includes a fix for the aforementioned problem. If you are in urgent need of this functionality, you may also use the image I have packaged, which has already addressed these issues.
   ```shell
   docker pull crazylychee/rocketmqdashboard:3.0
   ```
   


-- 
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: commits-unsubscribe@rocketmq.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [ISSUE #274] fix:Failed to find messages older than 3 days using message ID [rocketmq-dashboard]

Posted by "RongtongJin (via GitHub)" <gi...@apache.org>.
RongtongJin commented on PR #275:
URL: https://github.com/apache/rocketmq-dashboard/pull/275#issuecomment-2764965088

   LGTM~


-- 
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: commits-unsubscribe@rocketmq.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [ISSUE #274] fix:Failed to find messages older than 3 days using message ID [rocketmq-dashboard]

Posted by "RongtongJin (via GitHub)" <gi...@apache.org>.
RongtongJin merged PR #275:
URL: https://github.com/apache/rocketmq-dashboard/pull/275


-- 
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: commits-unsubscribe@rocketmq.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org