tracing: avoid data races w.r.t noopSpan#55937
Merged
craig[bot] merged 2 commits intocockroachdb:masterfrom Oct 24, 2020
Merged
tracing: avoid data races w.r.t noopSpan#55937craig[bot] merged 2 commits intocockroachdb:masterfrom
craig[bot] merged 2 commits intocockroachdb:masterfrom
Conversation
We were not properly turning all operations on noopSpan into noops. There is still a lot left to clean up here. Ultimately I want noop spans to be nil pointers, but that means moving the tracer off first, and this in turn means moving off the opentracing interfaces. Fixes cockroachdb#50032. Release note: None
Member
tbg
commented
Oct 24, 2020
| } | ||
| } | ||
|
|
||
| // Set initial tags. |
Member
Author
There was a problem hiding this comment.
This movement was necessary to fix a bug: we were linking the shadow span after adding baggage to the parent, so the shadow span never received them. Erroneously passed before my other fixes here.
Member
Author
|
I got through a few race iterations of #50032 without issues locally. Will leave it running for a bit and merge on green since the bug this fixes is quite destabilizing. |
Member
Author
|
There's a test failure that I will look into tonight. |
…ptor Skipping this temporarily so I can unscrew tracing. Release note: None
Member
Author
|
bors r+ |
Contributor
|
Build succeeded: |
tbg
added a commit
to tbg/cockroach
that referenced
this pull request
Oct 27, 2020
We were previously shoehorning our tracing subsystem into the opentracing framework. This resulted in lots of bending over backwards to no real gain. Move off the interfaces so that we can more easily refactor the code for always-on tracing as well as make it more digestible. This commit is mostly mechanical. A bunch of code around the RPC interceptors was cribbed from the `otgrpc` package. Cleanups are delegated to additional commits. TestFollowerReadsWithStaleDescriptor, skipped temporarily in cockroachdb#55937, passes again due to the rearrangement in `startSpanGeneric` (we were setting the spanID too late, which led to tags being dropped). Release note: None
tbg
added a commit
to tbg/cockroach
that referenced
this pull request
Oct 27, 2020
We were previously shoehorning our tracing subsystem into the opentracing framework. This resulted in lots of bending over backwards to no real gain. Move off the interfaces so that we can more easily refactor the code for always-on tracing as well as make it more digestible. This commit is mostly mechanical. A bunch of code around the RPC interceptors was cribbed from the `otgrpc` package. Cleanups are delegated to additional commits. TestFollowerReadsWithStaleDescriptor, skipped temporarily in cockroachdb#55937, passes again due to the rearrangement in `startSpanGeneric` (we were setting the spanID too late, which led to tags being dropped). Release note: None
craig bot
pushed a commit
that referenced
this pull request
Oct 28, 2020
56012: tracing: move off opentracing interfaces r=knz,irfansharif a=tbg We were previously shoehorning our tracing subsystem into the opentracing framework. This resulted in lots of bending over backwards to no real gain. Move off the interfaces so that we can more easily refactor the code for always-on tracing as well as make it more digestible. This commit is mostly mechanical. A bunch of code around the RPC interceptors was cribbed from the `otgrpc` package. Cleanups are delegated to additional commits. TestFollowerReadsWithStaleDescriptor, skipped temporarily in #55937, passes again due to the rearrangement in `startSpanGeneric` (we were setting the spanID too late, which led to tags being dropped). Release note: None Co-authored-by: Tobias Grieger <tobias.b.grieger@gmail.com>
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
We were not properly turning all operations on noopSpan into noops.
There is still a lot left to clean up here. Ultimately I want noop spans
to be nil pointers, but that means moving the tracer off first, and this
in turn means moving off the opentracing interfaces.
Touches #50032
Closes #55911,
Closes #55912,
Closes #55913,
Closes #55914,
Closes #55917,
Closes #55918,
Closes #55919, and
Closes #55936.
Release note: None