sql: fix phase time and session tracing for pausable portals #99410
Labels
A-pausable-portals
Issues related to multiple active portals
C-bug
Code not up to spec/doc, specs & docs deemed correct. Solution expected to change code/behavior.
T-sql-foundations
SQL Foundations Team (formerly SQL Schema + SQL Sessions)
Originally, a query's lifecycle is expected to be complete in the closure of
connExecutor.dispatchToExecutionEngine()
. This is no longer true for pausable portals as we will rerun this function when re-executing the same portal. For example, the phasesessionphase.PlannerStartExecStmt
maybe should only happen when the query is run for the first time.cockroach/pkg/sql/conn_executor_exec.go
Line 1305 in d8ea15c
Similarly, maybe we should set the
sessionTracing.TracePlanEnd
only when we close the portal.cockroach/pkg/sql/conn_executor_exec.go
Line 1277 in 2bd2c80
Or maybe we have these phases to be execution-bound rather than query-bound, but we should make it more explicit for pausable portals. Alternatively, we may want to have both execution-bound and query-bound phase markers.
Jira issue: CRDB-25870
Epic CRDB-25183
The text was updated successfully, but these errors were encountered: