Skip to content
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

feat(retainer): clean expired messages in separate process #13969

Merged
merged 8 commits into from
Oct 10, 2024

Conversation

keynslug
Copy link
Contributor

@keynslug keynslug commented Oct 9, 2024

Fixes EMQX-13213.

Release version: v5.8.2

Summary

See individual commits.

PR Checklist

Please convert it to a draft if any of the following conditions are not met. Reviewers may skip over until all the items are checked:

  • Added tests for the changes
  • Added property-based tests for code which performs user input validation
  • Changed lines covered in coverage report
  • Change log has been added to changes/(ce|ee)/(feat|perf|fix|breaking)-<PR-id>.en.md files
  • For internal contributor: there is a jira ticket to track this change
  • Created PR to emqx-docs if documentation update is required, or link to a follow-up jira ticket
  • Schema changes are backward compatible

@keynslug keynslug force-pushed the fix/EMQX-13213/retainer-gc branch from 41b46ce to 13fc313 Compare October 10, 2024 12:06
@keynslug keynslug changed the base branch from release-58 to master October 10, 2024 12:07
@keynslug keynslug force-pushed the fix/EMQX-13213/retainer-gc branch from 13fc313 to b5c8907 Compare October 10, 2024 12:23
@keynslug keynslug marked this pull request as ready for review October 10, 2024 12:24
@keynslug keynslug requested review from lafirest and a team as code owners October 10, 2024 12:24
@keynslug keynslug requested a review from savonarola October 10, 2024 13:44
deadline => erlang:system_time(millisecond),
limit => emqx_conf:get([retainer, msg_clear_limit], all)
},
_Result = emqx_retainer_sup:start_gc(Context, Opts),
Copy link
Contributor

Choose a reason for hiding this comment

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

Should we monitor the process and not start the next iteration until the previous one is finished?
E.g. to avoid piling up the cleaners.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Supervisor starts it under the same child id each time, so in this case _Result should be {error, {already_started, ...}} (appreciate a double-check of this claim).

@keynslug keynslug merged commit 58c138e into emqx:master Oct 10, 2024
195 checks passed
@keynslug keynslug deleted the fix/EMQX-13213/retainer-gc branch October 10, 2024 19:14
Copy link
Member

@zmstone zmstone left a comment

Choose a reason for hiding this comment

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

Please add a changelog

keynslug added a commit to keynslug/emqx that referenced this pull request Oct 13, 2024
@keynslug
Copy link
Contributor Author

Please add a changelog

#13985

keynslug added a commit that referenced this pull request Oct 17, 2024
@emqxqa
Copy link

emqxqa commented Oct 22, 2024

TestExecution

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.

4 participants