sql: improve how regions information is collected for telemetry #88498
Labels
C-cleanup
Tech debt, refactors, loose ends, etc. Solution not expected to significantly change behavior.
E-quick-win
Likely to be a quick win for someone experienced.
T-sql-queries
SQL Queries Team
#86829 added the regions information into the telemetry. In order to minimize the changes and to make the commit backportable it relied on the existing infrastructure used for the
EXPLAIN
output to get the regions information. This is a bit hacky (e.g. #88343 had to make additional changes to not break things), so we should refactor this since there is no reason to force building the EXPLAIN output when it's only needed to get the regions information output. We should instead analyze the flow specifications (we have "save flows" function for that) after the physical planning has been performed and store the regions information in the instrumentation helper. Care needs to be taken to not introduce any performance impact sincegetAllNodeDescriptors
might have non-trivial overhead.Jira issue: CRDB-19945
The text was updated successfully, but these errors were encountered: