DFS the trace tree for the first span matching `blockId`.
( spans: BackfillTraceSpan[] | undefined, blockId: string )
| 56 | |
| 57 | /** DFS the trace tree for the first span matching `blockId`. */ |
| 58 | function findSpanByBlockId( |
| 59 | spans: BackfillTraceSpan[] | undefined, |
| 60 | blockId: string |
| 61 | ): BackfillTraceSpan | undefined { |
| 62 | if (!spans) return undefined |
| 63 | for (const span of spans) { |
| 64 | if (span.blockId === blockId) return span |
| 65 | const child = findSpanByBlockId(span.children, blockId) |
| 66 | if (child) return child |
| 67 | } |
| 68 | return undefined |
| 69 | } |
| 70 | |
| 71 | /** One keyset page of completed (rowId, executionId) pairs for the group, ordered by rowId. */ |
| 72 | async function selectCompletedExecPage( |
no outgoing calls
no test coverage detected