You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@rocketmq.apache.org by "123123213weqw (via GitHub)" <gi...@apache.org> on 2026/10/19 10:33:25 UTC

[PR] fix(alert): clamp representable alert durations instead of overflowing the evaluation deadline [rocketmq-dashboard]

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

   Fixes #6436.
   
   A representable alert duration (`9223372036854775807s` — `Duration.ofSeconds(Long.MAX_VALUE)`) overflowed during evaluation: both named paths in `AlertStateMachine.advanceHit` constructed an out-of-range deadline (`pendingAt.plus(duration)` in the pending branch, `lastNotifiedAt.plus(reminderInterval)` in the reminder branch) and threw `ArithmeticException: long overflow` instead of evaluating.
   
   The state machine now compares elapsed time against the configured `Duration` directly (`Duration.between(pendingAt, now).compareTo(duration)`) without ever constructing an out-of-range deadline. Exact-boundary semantics are preserved (elapsed == duration still fires/reminds, covered by the existing 299s/300s and 29min/30min cases), and clock rollback keeps the run pending / suppresses the reminder.
   
   Red-first: two new `AlertStateMachineTest` cases overflow on the old code on exactly the issue's paths; both pass with the fix. `AlertStateMachineTest` 9/9 and `AlertRuleDurationTest` 11/11.
   
   Note on #6450 (filed in the same area): the repeated/reversed-unit grammar it describes was already fixed on base by #6451 (963e39e8b) — verified against the issue's expected accept/reject grammar, no change needed for that one.
   


-- 
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(alert): clamp representable alert durations instead of overflowing the evaluation deadline [rocketmq-dashboard]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] closed pull request #7052: fix(alert): clamp representable alert durations instead of overflowing the evaluation deadline
URL: https://github.com/apache/rocketmq-dashboard/pull/7052


-- 
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(alert): clamp representable alert durations instead of overflowing the evaluation deadline [rocketmq-dashboard]

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

   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