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

Only schedule another refresh if `refresh_interval` is positive #8087

Closed
wants to merge 2 commits into from

Conversation

Projects
None yet
3 participants
@mikemccand
Copy link
Contributor

commented Oct 15, 2014

If a EngingRefresher.run was already running when the refresh_interval is
dynamically updated down to a non-positive value (0, -1, etc.), then
it's was possible for the refresh thread to go into while (true)
refresh() loop.

Closes #8085

Core: only schedule another refresh if refresh_interval is positive
If a refresh was already running when the refresh_interval is
dynamically updated down to a non-positive value (0, -1, etc.), then
it's was possible for the refresh thread to go into while (true)
refresh() loop.

Closes #8085

@mikemccand mikemccand added the review label Oct 15, 2014

@s1monw

This comment has been minimized.

Copy link
Contributor

commented Oct 15, 2014

LGTM

@s1monw

This comment has been minimized.

Copy link
Contributor

commented Oct 15, 2014

@mikemccand maybe put a comment on the future.cancle why we don't pass true :)

@mikemccand mikemccand removed the review label Oct 15, 2014

mikemccand added a commit that referenced this pull request Oct 15, 2014

Core: don't spin 100% CPU when disabling refresh_interval
If refresh was already running when the refresh_interval is
dynamically disabled (set to a non-positive value like 0, -1, etc.),
then it's possible for the refresh thread to go into while (true)
refresh() loop.

Closes #8085

Closes #8087

mikemccand added a commit that referenced this pull request Oct 15, 2014

Core: don't spin 100% CPU when disabling refresh_interval
If refresh was already running when the refresh_interval is
dynamically disabled (set to a non-positive value like 0, -1, etc.),
then it's possible for the refresh thread to go into while (true)
refresh() loop.

Closes #8085

Closes #8087

mikemccand added a commit that referenced this pull request Oct 15, 2014

Core: don't spin 100% CPU when disabling refresh_interval
If refresh was already running when the refresh_interval is
dynamically disabled (set to a non-positive value like 0, -1, etc.),
then it's possible for the refresh thread to go into while (true)
refresh() loop.

Closes #8085

Closes #8087

@clintongormley clintongormley changed the title Core: only schedule another refresh if refresh_interval is positive Internal: Only schedule another refresh if `refresh_interval` is positive Nov 3, 2014

@clintongormley clintongormley changed the title Internal: Only schedule another refresh if `refresh_interval` is positive Only schedule another refresh if `refresh_interval` is positive Jun 7, 2015

mute pushed a commit to mute/elasticsearch that referenced this pull request Jul 29, 2015

Core: don't spin 100% CPU when disabling refresh_interval
If refresh was already running when the refresh_interval is
dynamically disabled (set to a non-positive value like 0, -1, etc.),
then it's possible for the refresh thread to go into while (true)
refresh() loop.

Closes elastic#8085

Closes elastic#8087

mute pushed a commit to mute/elasticsearch that referenced this pull request Jul 29, 2015

Core: don't spin 100% CPU when disabling refresh_interval
If refresh was already running when the refresh_interval is
dynamically disabled (set to a non-positive value like 0, -1, etc.),
then it's possible for the refresh thread to go into while (true)
refresh() loop.

Closes elastic#8085

Closes elastic#8087
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.