-
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
server: spammy trace logging on context cancellation #105378
Comments
cc @cockroachdb/disaster-recovery |
I think part of the problem here is that we're checking the error kind (e.g. Lines 1315 to 1320 in a1bea39
For example, consider if we end up making another RPC call somewhere below us in the stack, and something goes wrong with it so we return a We should instead be checking I don't know if this will fully address the problem, but it's at least part of the problem. |
That makes sense, I'll try changing it to check the caller's context instead and see if it still spams the logs. Another conservative option is to allow list batch requests that will actually print on context timeout + cancellation. For the time being this can be only ExportRequests. |
Yeah, that'd help. I also noticed that most of the spans were empty, so they probably hadn't fully enabled tracing (or maybe we don't return traces on context cancellation). Could maybe have some additional conditions here to filter out traces that are pointless to log. |
Still seeing a lot of these, e.g. over on #106108:
|
This change adds a conditional to only print the trace of context cancelled request if the trace is not empty. This avoids log spam noticed in cockroachdb#105378. Fixes: cockroachdb#105378 Release note: None
This change adds a conditional to only print the trace of context cancelled request if the trace is not empty. This avoids log spam noticed in cockroachdb#105378. Fixes: cockroachdb#105378 Release note: None
106280: server: don't print trace if empty r=knz a=adityamaru This change adds a conditional to only print the trace of context cancelled request if the trace is not empty. This avoids log spam noticed in #105378. Fixes: #105378 Release note: None Co-authored-by: adityamaru <[email protected]>
This change adds a conditional to only print the trace of context cancelled request if the trace is not empty. This avoids log spam noticed in cockroachdb#105378. Fixes: cockroachdb#105378 Release note: None
In #102793, we began logging trace events on context cancellation. However, this results in traces being logged constantly, mostly for internal requests. We see this frequently in roachtests, e.g. #104709 and #105260, often due to
HeartbeatTxn
,QueryTxn
, andEndTxn
requests. The traces are often, but not always, empty. We need to do something about these.Here's an example, there were thousands of these in a few minutes.
Jira issue: CRDB-29006
The text was updated successfully, but these errors were encountered: