You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@rocketmq.apache.org by "yyqdbngt (via GitHub)" <gi...@apache.org> on 2026/09/01 22:13:46 UTC

[PR] fix(message): skip query history purge when retention exceeds date range [rocketmq-dashboard]

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

   ## Summary
   - guard `QueryHistoryService.purgeExpiredQueries` against a `DateTimeException` when the configured retention pushes the cutoff outside the `LocalDateTime` date range
   - add a regression test that an out-of-range retention skips the purge instead of throwing
   
   ## Why
   `LocalDateTime.now(clock).minusDays(retentionDays)` ran outside any try/catch, so a misconfigured `studio.query-history.retention-days` (e.g. several hundred million days) would throw a `DateTimeException` on every schedule tick and silently kill both the message and trace history purges, leaving stale rows forever. The purge now logs a warning and skips the tick, keeping the failure visible without breaking the schedule.
   
   ## Testing
   - `cd server && mvn -q -Dtest=QueryHistoryServiceTest test` — all tests pass, including the new `skipsPurgeWhenRetentionExceedsTheDateRange`
   - `cd server && mvn -q -Dtest=QueryHistoryControllerTest test` — all tests pass (regression for the history endpoints)
   


-- 
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] fix(message): skip query history purge when retention exceeds date range [rocketmq-dashboard]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #2941:
URL: https://github.com/apache/rocketmq-dashboard/pull/2941#issuecomment-5611294812

   This pull request has been automatically closed because there has been no activity for 7 days. If you would like to continue working on this, please reopen the PR with updated changes.


-- 
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] fix(message): skip query history purge when retention exceeds date range [rocketmq-dashboard]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] closed pull request #2941: fix(message): skip query history purge when retention exceeds date range
URL: https://github.com/apache/rocketmq-dashboard/pull/2941


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