-
Notifications
You must be signed in to change notification settings - Fork 3.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
When we're performing tracing, we derive a special `consumeCtx` when creating a DistSQLReceiver for the whole plan. That context should be used for all components of the physical plan (main query, sub- and post-queries), and the span needs to be finished by calling the stored `cleanup` function. Previously, this was called in `ProducerDone` of the main query which resulted in the span being finished before the post-queries are run. As a result, the tracing spans for cascades and checks could be incomplete. This commit fixes the problem by delaying the finish of the span until the DistSQLReceiver is released (since it is a convenient place that all callers of `MakeDistSQLReceiver` call in a deferred invocation). Release justification: bug fix. Release note (bug fix): Previously, the traces of cascades and checks could be incomplete, and now it is fixed.
- Loading branch information
1 parent
0fe3d67
commit cb3e0aa
Showing
3 changed files
with
9 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters