* Rebuild the segment vocabulary from the current graph, batched and * yielding — the upgrade-heal path for indexes built before the vocab table * existed. Runs inside the index mutex/lock (sync and * healSegmentVocabIfEmpty hold them).
()
| 1453 | * healSegmentVocabIfEmpty hold them). |
| 1454 | */ |
| 1455 | private async rebuildNameSegmentVocab(): Promise<void> { |
| 1456 | const maybeYield = createYielder(); |
| 1457 | const BATCH = 2000; |
| 1458 | for (let offset = 0; ; offset += BATCH) { |
| 1459 | const names = this.queries.getDistinctNodeNames(BATCH, offset); |
| 1460 | if (names.length === 0) break; |
| 1461 | this.queries.insertNameSegmentsBatch(names); |
| 1462 | await maybeYield(); |
| 1463 | } |
| 1464 | } |
| 1465 | |
| 1466 | /** |
| 1467 | * Normalized project-name tokens (go.mod / package.json / repo dir) used to |
no test coverage detected