cockroachdb / cockroachdb/cockroach

ui: add history of statements to session details when restarting

Open
#98,161 0 comments 1 reaction 0 assignees View on GitHub
A-sql-observability A-sql-ui C-enhancement
Dominant language
Go
Stars
32.5k
Forks
4.1k
PR merge metrics
PR metrics pending

Description

**Is your feature request related to a problem? Please describe.**

The UI for the sessions page shows the most recent statement from the current transaction. This can be very helpful. In some cases, transactions get caught in retry loops. In these cases, it'd be nice to see all of the statements executed in the previous iteration.

**Describe the solution you'd like**
We should track and display all of the statements run in the previous iteration of a transaction in the sessions view when a transaction is restarting.

**Describe alternatives you've considered**
It could be interesting to surface all transactions which encountered a restart. Today it's hard to find them if the transaction never actually finishes.

**Additional context**
It's possible that all the information is there somewhere and I just don't know how to find it. It'd also be nice to get the full set of statements for transactions which have restarted in a debug zip.

Jira issue: CRDB-25111

Contributor guide

Open the contributing guide

Research direction

Start with the sessions page and sessions view, then trace how transaction restart information reaches the UI. Determine where statements from the previous iteration can be observed and how the restarted state is represented. Done means the sessions view displays the full prior-iteration statement history for restarting transactions.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
database
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.