StatementStatistics.Nodes appears to be incomplete #96647
Labels
A-sql-observability
Related to observability of the SQL layer
C-bug
Code not up to spec/doc, specs & docs deemed correct. Solution expected to change code/behavior.
In my investigations for #89949, I believe I've discovered we are under-reporting the nodes involved in a distsql query in
crdb_internal.statement_statistics
and friends.To reproduce, create a multi-region database with a populated regional by row table, and select * from it. The resulting
statistics->>'statistics'->>'nodes'
value incrdb_internal.statement_statistics
should show at least one node from each region, but it will instead only show the gateway node. (Note thatEXPLAIN (DISTSQL)
however does show all the involved nodes.)I believe the suspect code is in
getNodesFromPlanner
in executor_statement_metrics.go.Observed on a 22.2 release as well as on (current) pre-23.1 master.
Jira issue: CRDB-24263
The text was updated successfully, but these errors were encountered: