Skip to content

[ISSUE #10872] fix(broker): reject overflowing timer delays - #10882

Open
yuluo-yx wants to merge 1 commit into
apache:developfrom
yuluo-yx:0809-yuluo-yx/fix-3
Open

[ISSUE #10872] fix(broker): reject overflowing timer delays#10882
yuluo-yx wants to merge 1 commit into
apache:developfrom
yuluo-yx:0809-yuluo-yx/fix-3

Conversation

@yuluo-yx

@yuluo-yx yuluo-yx commented Aug 9, 2026

Copy link
Copy Markdown
Member

Which Issue(s) This PR Fixes

Brief Description

Relative timer delay conversion now uses exact long arithmetic. Seconds-to-milliseconds and current-time addition overflow are rejected through the existing WHEEL_TIMER_MSG_ILLEGAL path instead of wrapping into an immediate timestamp.

How Did You Test This Change?

  • mise exec java@zulu-8.94.0.17 -- mvn -pl broker -am -DskipITs -Dtest=HookUtilsTest -Dsurefire.failIfNoSpecifiedTests=false test (3 tests passed)
  • Checkstyle and SpotBugs passed in the same Maven reactor.
  • git diff --check and the 400-line scope gate passed.
  • Not run: full repository build, container tests, or end-to-end tests.

@codecov-commenter

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 80.00000% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 48.31%. Comparing base (fd0c959) to head (9ce2c14).

Files with missing lines Patch % Lines
...ava/org/apache/rocketmq/broker/util/HookUtils.java 80.00% 1 Missing ⚠️
Additional details and impacted files
@@              Coverage Diff              @@
##             develop   #10882      +/-   ##
=============================================
- Coverage      48.39%   48.31%   -0.09%     
+ Complexity     13562    13538      -24     
=============================================
  Files           1380     1380              
  Lines         101165   101168       +3     
  Branches       13127    13127              
=============================================
- Hits           48962    48882      -80     
- Misses         46233    46294      +61     
- Partials        5970     5992      +22     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@RockteMQ-AI RockteMQ-AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Trivial change, looks good.


Automated review by github-manager-bot

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug] Overflowing relative timer delays can be treated as immediate

3 participants