-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
downsample: fix deadlock if error occurs #4962
Conversation
Fix deadlock that occurs if there is some backlog of blocks to be deduplicated, and an error occurs. For this to trigger, there needs to be at least `downsampleConcurrency + 2` blocks in the backlog. Add test to cover this regression. Affected versions 0.22.0 - 0.23.1. Signed-off-by: Giedrius Statkevičius <giedrius.statkevicius@vinted.com>
1488f4b
to
76c9019
Compare
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.
I've done a review, though it's a bit passed my experience level; it looks really good and it's clear what it fixes. So, thats the scope of my review :)
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! Great resolution 👍🏽
I don't thing this happens to default setups though as we don't have concurrency by default, right?
It does, the test shows that. :D It's enough to have an error occur while downsampling and to have some blocks in the downsampling backlog for this to occur. Most of the time it is enough to have two extra in the backlog but if you are lucky (depending on the scheduler) the deadlock might not happen |
Fix deadlock that occurs if there is some backlog of blocks to be deduplicated, and an error occurs. For this to trigger, there needs to be at least `downsampleConcurrency + 2` blocks in the backlog. Add test to cover this regression. Affected versions 0.22.0 - 0.23.1. Signed-off-by: Giedrius Statkevičius <giedrius.statkevicius@vinted.com>
👍🏽 |
Fix deadlock that occurs if there is some backlog of blocks to be deduplicated, and an error occurs. For this to trigger, there needs to be at least `downsampleConcurrency + 2` blocks in the backlog. Add test to cover this regression. Affected versions 0.22.0 - 0.23.1. Signed-off-by: Giedrius Statkevičius <giedrius.statkevicius@vinted.com>
* downsample: fix deadlock if error occurs (#4962) Fix deadlock that occurs if there is some backlog of blocks to be deduplicated, and an error occurs. For this to trigger, there needs to be at least `downsampleConcurrency + 2` blocks in the backlog. Add test to cover this regression. Affected versions 0.22.0 - 0.23.1. Signed-off-by: Giedrius Statkevičius <giedrius.statkevicius@vinted.com> * VERSION: bump Signed-off-by: Giedrius Statkevičius <giedrius.statkevicius@vinted.com> * Makefile: update SHA256 Update from https://github.com/thanos-io/thanos/blob/main/Makefile#L16-L17. Signed-off-by: Giedrius Statkevičius <giedrius.statkevicius@vinted.com> * *: 0.23.2 -> 0.23.2-rc.1 Signed-off-by: Giedrius Statkevičius <giedrius.statkevicius@vinted.com>
* Update version Signed-off-by: Giedrius Statkevičius <giedrius.statkevicius@vinted.com> * downsample: fix deadlock if error occurs (#4962) Fix deadlock that occurs if there is some backlog of blocks to be deduplicated, and an error occurs. For this to trigger, there needs to be at least `downsampleConcurrency + 2` blocks in the backlog. Add test to cover this regression. Affected versions 0.22.0 - 0.23.1. Signed-off-by: Giedrius Statkevičius <giedrius.statkevicius@vinted.com> * Makefile: update SHA256 Signed-off-by: Giedrius Statkevičius <giedrius.statkevicius@vinted.com> * Makefile/CHANGELOG: fix format Signed-off-by: Giedrius Statkevičius <giedrius.statkevicius@vinted.com>
Fix deadlock that occurs if there is some backlog of blocks to be
deduplicated, and an error occurs. For this to trigger, there needs to
be at least
downsampleConcurrency + 2
blocks in the backlog.Add test to cover this regression. Affected versions 0.22.0 - 0.23.1.
Fixes #4960.
Signed-off-by: Giedrius Statkevičius giedrius.statkevicius@vinted.com