-
Notifications
You must be signed in to change notification settings - Fork 4.1k
sql: indicate that the statement was retried in statement bundles #142674
Description
We saw a case where an EXPLAIN ANALYZE statement ran for 8 hours, but the collected bundle only covered a successful 20-second execution. The statement was retrying due to contention during most of that time. We should surface information about retries as part of the statement bundle to avoid confusion in the future.
Snippet from conversation with @yuzefovich:
hm, I’d expect that we’d collect a separate bundle for each execution attempt, and then there is a question of which bundle actually gets stored:
if the bundle was collected via explicit EXPLAIN ANALYZE (DEBUG) call, then it looks like the last bundle should be returned, and all prior iterations should still be stored in the system table
if the bundle was collected due to “activate diagnostics”, then the first bundle would be stored and all others would be ignored. (This is because such bundle will have requestID being non-zero which modifies the behavior of InsertStatementDiagnostics)
Jira issue: CRDB-48469
Metadata
Metadata
Assignees
Labels
Type
Projects
Status