We should provide a historical view of Sessions as we have with Transactions and Statements. This issue tracks the V1 experience of persisting "Closed" Sessions for a period of time. V2 builds on top of this by adding additional session details and statistics.
Adding historical sessions including additional information would provide a higher-level grouping of customer workloads at the session-level. CockroachDB workloads typically issue single statement transactions (implicit) and allowing a grouping at the session level will allow users to:
- Verify customer application logic is correct by being able to review the transactions/statements that were issued in a particular session
- Identify and troubleshoot specific sessions at a particular time that issued transactions/statements with slow (or failed) executions.
- Identify and troubleshoot specific sessions that consumed a relatively large amount of ‘time’ from the database.
For this issue, crdb_internal.cluster_session and the existing console information is captured and surfaced for closed sessions. New information to add includes the "Closed" status and End time.
Given the potential size of data there are a few options we can explore in terms of the retention period:
- N hour retention period in memory
- Max #rows for this crdb_internal table where oldest entries would then be purged (can be applied in conjunction with 1)
- Like statement and transaction persisted statistics, we keep a subset of the data in memory and flush it to disc at various intervals.
Link to the current Figma
Epic: CRDB-9087
Jira issue: CRDB-8763
We should provide a historical view of Sessions as we have with Transactions and Statements. This issue tracks the V1 experience of persisting "Closed" Sessions for a period of time. V2 builds on top of this by adding additional session details and statistics.
Adding historical sessions including additional information would provide a higher-level grouping of customer workloads at the session-level. CockroachDB workloads typically issue single statement transactions (implicit) and allowing a grouping at the session level will allow users to:
For this issue, crdb_internal.cluster_session and the existing console information is captured and surfaced for closed sessions. New information to add includes the "Closed" status and End time.
Given the potential size of data there are a few options we can explore in terms of the retention period:
Link to the current Figma
Epic: CRDB-9087
Jira issue: CRDB-8763