-
Notifications
You must be signed in to change notification settings - Fork 816
Do not close and re-open TSDBs during ingester transfer #1854
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
Do not close and re-open TSDBs during ingester transfer #1854
Conversation
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.
Looks good to me. I don't quite understand the decision to keep on transferring even if there are still writers though.
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.
Nice. There is one small change I think should be made (see comment), but still looks good ;-)
@thorfour May you check it out again and - if you don't have any further comment and you're good with it - approve it, please? Otherwise feel free to take more time to think about it or comment. |
@pracucci will take a look first thing Monday |
0d5dd4c
to
5e84cc4
Compare
@gouthamve and @thorfour I've fixed the conflicts after rebasing. May you take a look and help this PR moving forward, please? |
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
36819ba
to
5d9e956
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.
LGTM
…shutdown Signed-off-by: Marco Pracucci <[email protected]>
…ter shutdown Signed-off-by: Marco Pracucci <[email protected]>
Signed-off-by: Marco Pracucci <[email protected]>
…nstead of a timeout Signed-off-by: Marco Pracucci <[email protected]>
Signed-off-by: Marco Pracucci <[email protected]>
…ler more info about the reasion Signed-off-by: Marco Pracucci <[email protected]>
…ight requests to complete in the ingester's TSDB transfer Signed-off-by: Marco Pracucci <[email protected]>
Signed-off-by: Marco Pracucci <[email protected]>
Signed-off-by: Marco Pracucci <[email protected]>
Signed-off-by: Marco Pracucci <[email protected]>
5d9e956
to
f449a43
Compare
Signed-off-by: Marco Pracucci <[email protected]>
What this PR does:
The Cortex TSDB experimental integration currently close all TSDBs during the ingester shutdown, before blocks and WALs are transferred to a joining ingester. This has two main issues:
open index reader: block is closing
Me and @codesome checked out the TSDB implementation and came to the conclusion which is safe to transfer blocks as WAL without closing the TSDB as far as:
In this PR I've introduced some changes to avoid closing and re-opening TSDBs on queries received during ingester blocks/WAL transfer, as well as some logic to guarantee no writes occur to the TSDB once the transfer starts.
I've tested the changes in our TSDB test cluster and looks working as expected (at least, experimentally).
Suggestion to the reviewer: enable "Hide whitespace changes" because there are a couple of large code blocks for which it has changed only the indentation.
Which issue(s) this PR fixes:
Fixes #1829
Checklist
CHANGELOG.md
updated - the order of entries should be[CHANGE]
,[FEATURE]
,[ENHANCEMENT]
,[BUGFIX]