-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
Conversation
That is expected to run only on a single node in a cluster at a time.
...Through forcing it to stop after specific (e.g. 50000) number of cleared retained messages.
41b46ce
to
13fc313
Compare
As a hidden option for now.
13fc313
to
b5c8907
Compare
deadline => erlang:system_time(millisecond), | ||
limit => emqx_conf:get([retainer, msg_clear_limit], all) | ||
}, | ||
_Result = emqx_retainer_sup:start_gc(Context, Opts), |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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).
There was a problem hiding this 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
|
chore: add #13969 changelog entry
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 property-based tests for code which performs user input validationchanges/(ce|ee)/(feat|perf|fix|breaking)-<PR-id>.en.md
filesCreated PR to emqx-docs if documentation update is required, or link to a follow-up jira ticket