-
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
cmd/thanos/receive: fix close chan panic #1595
Conversation
Yes you’re totally right. This is an unrelated issue but a bug nonetheless. I’ll address this in the same pr |
This commit fixes a panic caused by sending on the chan which is closed too early. This chan was closed when the setup func returned, rather than when the group's goroutine returned. Fixes: thanos-io#1594 Signed-off-by: Lucas Servén Marín <[email protected]>
Confirmed these changes resolved the panics. However hit another issue where the TSDB doesn't start back up after a flush event. Looks to me this cancel call closes the Line 422 in e7d8707
|
Yeah you’re right. That cancel is leftover from a previous iteration where the upload used a cancellable context and |
This commit fixes how the uploader is cleaned up. Currently, it was cleaned up in a defer block that was run before the run groups. This ensures the cleanup occurs only when the run groups are returning. Signed-off-by: Lucas Servén Marín <[email protected]>
* cmd/thanos/receive: fix close chan panic This commit fixes a panic caused by sending on the chan which is closed too early. This chan was closed when the setup func returned, rather than when the group's goroutine returned. Fixes: #1594 Signed-off-by: Lucas Servén Marín <[email protected]> * cmd/thanos/receive: correctly clean up uploader This commit fixes how the uploader is cleaned up. Currently, it was cleaned up in a defer block that was run before the run groups. This ensures the cleanup occurs only when the run groups are returning. Signed-off-by: Lucas Servén Marín <[email protected]> Signed-off-by: Giedrius Statkevičius <[email protected]>
This commit fixes a panic caused by sending on the chan which is closed
too early. This chan was closed when the setup func returned, rather
than when the group's goroutine returned.
Fixes: #1594
Signed-off-by: Lucas Servén Marín [email protected]