-
Notifications
You must be signed in to change notification settings - Fork 8.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
[8.16][Task Manager] Honor config-provided poll_interval #205064
Conversation
Pinging @elastic/response-ops (Team:ResponseOps) |
💚 Build Succeeded
Metrics [docs]
cc @afharo |
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.
Changes look good to me, and takes the claim strategy into account.
* @param config Current config | ||
* @param defaultPollInterval Default to set | ||
*/ | ||
function maybeSetDefaultInterval(config: TaskManagerConfig, defaultPollInterval: number) { |
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.
Thanks for the PR! I was looking at how this function differs to letting the poll_interval
overwrite completely (opts.config.poll_interval ?? DEFAULT_POLL_INTERVAL
).
From looking at the function, it seems if ever the user sets xpack.task_manager.poll_interval: 3000
in their yml and their deployment is auto enrolled to the mget
task claiming strategy, we're going to discard the 3000
and set 500
as the value. I guess this is the current behaviour on 8.16, was your intent to preserve this as well?
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.
IIUC, this method returns the default only if the user didn't provide it (which, in case they didn't set "mget" in their kibana.yml
is DEFAULT_POLL_INTERVAL).
I don't think that the a/b decision logic in this file affects it (at least, that was not my intention).
In case they set "mget" in their kibana.yml, this method is not called because there's an early return at the top of this file.
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.
LGTM, thanks for submitting a PR!
@elasticmachine merge upstream |
There are no new commits on the base branch. |
Summary
We noticed that 8.16 overrides the any configured
poll_interval
ifclaim_strategy
is not set (the default).Checklist