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

Core: changing refresh_interval to non-positive (0, -1, etc.) value might cause 100% CPU spin #8085

Closed
mikemccand opened this issue Oct 15, 2014 · 0 comments

Comments

@mikemccand
Copy link
Contributor

As reported on the user's list:

https://groups.google.com/d/msg/elasticsearch/IQWvod8hq_Q/H6358j_24B0J

It looks like there is a concurrency bug when you dynamically update refresh_interval down to a value <= 0. We cancel the scheduled future when this happens, but if the future was already executing (which we don't try to cancel because we pass false to the cancel call), EngineRefresher.run will then forever continue rescheduling itself for the immediate future.

@mikemccand mikemccand self-assigned this Oct 15, 2014
mikemccand added a commit to mikemccand/elasticsearch that referenced this issue Oct 15, 2014
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 elastic#8085
mikemccand added a commit that referenced this issue Oct 15, 2014
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 issue Oct 15, 2014
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 issue Oct 15, 2014
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
mute pushed a commit to mute/elasticsearch that referenced this issue Jul 29, 2015
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 issue Jul 29, 2015
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
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants