Skip to content

[ISSUE #8979] Add configurable switch for timer message retry logic #8980

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 9 commits into from
Dec 5, 2024

Conversation

chi3316
Copy link
Contributor

@chi3316 chi3316 commented Nov 25, 2024

Which Issue(s) This PR Fixes

Fixes #8979

Brief Description

  • Added a configuration switch TimerEnableRetryUntilSuccess to control retry behavior.
  • When TimerEnableRetryUntilSuccess is disabled, a message will be retried up to 3 times before being discarded.
  • Improved logging to better reflect message processing and retry status.

@codecov-commenter
Copy link

codecov-commenter commented Nov 25, 2024

Codecov Report

Attention: Patch coverage is 44.73684% with 21 lines in your changes missing coverage. Please review.

Project coverage is 47.70%. Comparing base (a8779c0) to head (d0d4c47).
Report is 6 commits behind head on develop.

Files with missing lines Patch % Lines
...apache/rocketmq/store/timer/TimerMessageStore.java 38.23% 13 Missing and 8 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             develop    #8980   +/-   ##
==========================================
  Coverage      47.70%   47.70%           
- Complexity     11782    11785    +3     
==========================================
  Files           1304     1304           
  Lines          91188    91218   +30     
  Branches       11713    11718    +5     
==========================================
+ Hits           43502    43517   +15     
- Misses         42315    42319    +4     
- Partials        5371     5382   +11     

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

}
return PUT_NO_RETRY;
return PUT_NEED_RETRY;
}

public MessageExtBrokerInner convertMessage(MessageExt msgExt, boolean needRoll) {
Copy link
Contributor

Choose a reason for hiding this comment

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

It would be beneficial to include a unit test

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I’ve added a unit test to cover this function. Please take a look👀

@chi3316 chi3316 marked this pull request as draft November 28, 2024 07:56
@chi3316 chi3316 marked this pull request as ready for review November 28, 2024 08:04
Copy link
Contributor

@RongtongJin RongtongJin left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Contributor

@guyinyou guyinyou left a comment

Choose a reason for hiding this comment

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

lgtm

Copy link
Contributor

@GenerousMan GenerousMan left a comment

Choose a reason for hiding this comment

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

LGTM

@RongtongJin RongtongJin merged commit d1fd7af into apache:develop Dec 5, 2024
11 checks passed
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.

[Enhancement] Optimize Timer Message Retry Mechanism
5 participants