Repository navigation
Commit bb4fca5
committed
fix(discover): resolve the cache directory once per walk, not per directory
cbm_resolve_cache_dir() returns a pointer to a static thread-local buffer. The
cache prune called it for every directory the walk visited, so it rewrote a buffer
other code was entitled to still be holding — an aliasing bug, not a cosmetic
inefficiency.
The Windows guards job caught it as two REDs: a daemon cold-storm regression and
a following "index did not run" setup failure. Both are consistent with the cache
path being rewritten underneath a live reader during indexing.
Resolve once at the discovery entry point into a thread-local copy and compare
against that, so the prune costs one resolver call per walk rather than one per
directory, and holds no pointer into shared storage.
Signed-off-by: Martin Vogel <martin.vogel.tech@gmail.com>1 parent 91f6223 commit bb4fca5
1 file changed
Lines changed: 16 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
563 | 563 | | |
564 | 564 | | |
565 | 565 | | |
| 566 | + | |
| 567 | + | |
| 568 | + | |
| 569 | + | |
| 570 | + | |
| 571 | + | |
| 572 | + | |
| 573 | + | |
| 574 | + | |
| 575 | + | |
| 576 | + | |
| 577 | + | |
| 578 | + | |
566 | 579 | | |
567 | 580 | | |
568 | 581 | | |
| |||
572 | 585 | | |
573 | 586 | | |
574 | 587 | | |
575 | | - | |
576 | | - | |
| 588 | + | |
| 589 | + | |
577 | 590 | | |
578 | 591 | | |
579 | 592 | | |
| |||
1190 | 1203 | | |
1191 | 1204 | | |
1192 | 1205 | | |
| 1206 | + | |
1193 | 1207 | | |
1194 | 1208 | | |
1195 | 1209 | | |
| |||
0 commit comments