Fix: Handle context correctly in the querier #3504
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
selectTree was using the a errgroup context past calling
Wait()
. This caused some errors when store-gateways were used for queries, that required deduplication.https://ops.grafana-ops.net/explore?schemaVersion=1&panes=%7B%22yce%22%3A%7B%22datasource%22%3A%22Em2icyuMk%22%2C%22queries%22%3A%5B%7B%22query%22%3A%2277764ad0d6f03fb3bab49a2c0176dad%22%2C%22queryType%22%3A%22traceql%22%2C%22refId%22%3A%22A%22%2C%22datasource%22%3A%7B%22type%22%3A%22tempo%22%2C%22uid%22%3A%22Em2icyuMk%22%7D%2C%22limit%22%3A20%2C%22tableType%22%3A%22traces%22%7D%5D%2C%22range%22%3A%7B%22from%22%3A%221724071628719%22%2C%22to%22%3A%221724072528719%22%7D%7D%7D&orgId=1
This fix also updated all errgroups returned contexts to use
gCtx
, as an additional measure we could consider using a block to limit the usegCtx
afterWait()
.