-
Notifications
You must be signed in to change notification settings - Fork 3.8k
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
tracing: number of spans growing unboundedly with blocked txns #59560
Comments
Again, this is probably not be a "bug" - it's almost certainly existing behaviour, just something I'm not sure how to explain. It could be due to a pattern like #59203 (comment) where we're holding onto an open txn, and thus the associated un-Finish()ed span, so I guess we're also iterating over all short lived children spans. Hm. The fact that we can't distinguish between "finished" spans and in-flight ones could be a bit annoying (we're surfacing |
One clear reason why the number of spans is going up is because once our txn starts heartbeating, the heartbeats get traced:
|
For Irfan's repro above:
This is consistent with two heartbeat loops sending a batch once per second. I see the count increase at approximately 2/sec. |
In cockroachdb#59560 we've seen that this can grow unboundedly. Set a limit out of an abundance of caution. Fixes cockroachdb#59188. Release note: None
Describe the problem
I was playing around with #59492. I tried setting up two txns, one that would block on another, and seeing what the traces show (to possibly grab a handle on where the blockage is occurring). Instead I observed that the set of spans captured in our internal registry kept growing unboundedly. The spans were cleared up once the txns were unblocked, but we should figure out why that's happening (this may be the same thing as #59391).
To Reproduce
Terminal 1:
Terminal 2:
Terminal 3:
Everything is appropriately cleaned up after closing out the T1 txn.
The text was updated successfully, but these errors were encountered: