Repository navigation
Commit 82b88a1
Stop a failed read from hiding a file for good
The reconcile pass skips files that failed to read last time and have not
changed since, so one permanently locked file does not make every hourly
reconcile rebuild the index. But the stamps published alongside that delta
were still built from the whole walk, including the skipped files. A stamp
means "indexed at this mtime and size", so a file nothing had read was
marked up-to-date: the next reconcile classified it as unchanged and skipped
it for a reason the memo could no longer clear, and because the stamp lands
in filestamps.json a restart did not help either. Every automatic caller of
the stale check passes compare_index_membership = false, which is exactly
the check that would have noticed the file was missing from the index.
The escape hatch and the memo now agree: a file kept out of the delta is
kept out of the stamps too, so it keeps looking new until it changes.
Pulling both halves into drop_memoized_failures and stamps_for_indexed lets
the test call the real code rather than a copy of it, which is why the old
test passed while the bug was live.
Also two smaller things from the same review:
The case-insensitive ignore pass ignored --no-ignore-vcs, --no-ignore-exclude
and --no-ignore-parent. It is only sound as a narrowing of the case-sensitive
pass, and those flags widen that pass to let everything through - which left
this matcher as the only thing excluding, so the flags excluded more than
passing nothing at all.
The git index parser reserved capacity straight from the 32-bit header count
before checking it against the file length, so a twelve-byte file claiming
four billion entries asked the allocator for ~146GB and aborted the process
in a way no caller can catch. Clamped to what the file could actually hold.
Co-authored-by: Copilot App <[email protected]>1 parent ebaf986 commit 82b88a1
4 files changed
Lines changed: 285 additions & 56 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2255 | 2255 | | |
2256 | 2256 | | |
2257 | 2257 | | |
| 2258 | + | |
| 2259 | + | |
| 2260 | + | |
| 2261 | + | |
| 2262 | + | |
| 2263 | + | |
| 2264 | + | |
| 2265 | + | |
| 2266 | + | |
| 2267 | + | |
| 2268 | + | |
| 2269 | + | |
| 2270 | + | |
| 2271 | + | |
| 2272 | + | |
| 2273 | + | |
| 2274 | + | |
| 2275 | + | |
| 2276 | + | |
| 2277 | + | |
| 2278 | + | |
| 2279 | + | |
| 2280 | + | |
| 2281 | + | |
| 2282 | + | |
| 2283 | + | |
| 2284 | + | |
| 2285 | + | |
| 2286 | + | |
| 2287 | + | |
| 2288 | + | |
| 2289 | + | |
| 2290 | + | |
| 2291 | + | |
| 2292 | + | |
| 2293 | + | |
| 2294 | + | |
| 2295 | + | |
| 2296 | + | |
| 2297 | + | |
| 2298 | + | |
| 2299 | + | |
| 2300 | + | |
| 2301 | + | |
| 2302 | + | |
| 2303 | + | |
| 2304 | + | |
| 2305 | + | |
| 2306 | + | |
| 2307 | + | |
| 2308 | + | |
| 2309 | + | |
| 2310 | + | |
| 2311 | + | |
| 2312 | + | |
| 2313 | + | |
| 2314 | + | |
2258 | 2315 | | |
2259 | 2316 | | |
2260 | 2317 | | |
2261 | 2318 | | |
2262 | 2319 | | |
2263 | 2320 | | |
2264 | | - | |
| 2321 | + | |
2265 | 2322 | | |
2266 | 2323 | | |
2267 | 2324 | | |
| |||
2354 | 2411 | | |
2355 | 2412 | | |
2356 | 2413 | | |
2357 | | - | |
2358 | | - | |
2359 | | - | |
2360 | | - | |
2361 | | - | |
2362 | | - | |
2363 | | - | |
2364 | | - | |
2365 | | - | |
2366 | | - | |
2367 | | - | |
2368 | | - | |
2369 | | - | |
2370 | | - | |
2371 | | - | |
2372 | | - | |
2373 | | - | |
2374 | | - | |
| 2414 | + | |
2375 | 2415 | | |
2376 | | - | |
| 2416 | + | |
2377 | 2417 | | |
2378 | | - | |
2379 | | - | |
| 2418 | + | |
| 2419 | + | |
| 2420 | + | |
2380 | 2421 | | |
2381 | 2422 | | |
2382 | 2423 | | |
| |||
2406 | 2447 | | |
2407 | 2448 | | |
2408 | 2449 | | |
2409 | | - | |
2410 | | - | |
2411 | | - | |
2412 | | - | |
2413 | | - | |
2414 | | - | |
2415 | | - | |
2416 | | - | |
2417 | | - | |
2418 | | - | |
2419 | | - | |
2420 | | - | |
| 2450 | + | |
2421 | 2451 | | |
2422 | 2452 | | |
2423 | 2453 | | |
| |||
3765 | 3795 | | |
3766 | 3796 | | |
3767 | 3797 | | |
3768 | | - | |
3769 | | - | |
3770 | | - | |
3771 | | - | |
3772 | | - | |
3773 | | - | |
3774 | | - | |
3775 | | - | |
3776 | | - | |
3777 | | - | |
3778 | | - | |
3779 | | - | |
| 3798 | + | |
| 3799 | + | |
3780 | 3800 | | |
3781 | 3801 | | |
3782 | 3802 | | |
3783 | | - | |
| 3803 | + | |
3784 | 3804 | | |
3785 | | - | |
| 3805 | + | |
3786 | 3806 | | |
3787 | | - | |
| 3807 | + | |
| 3808 | + | |
| 3809 | + | |
| 3810 | + | |
| 3811 | + | |
| 3812 | + | |
| 3813 | + | |
| 3814 | + | |
| 3815 | + | |
| 3816 | + | |
| 3817 | + | |
| 3818 | + | |
| 3819 | + | |
| 3820 | + | |
| 3821 | + | |
| 3822 | + | |
| 3823 | + | |
| 3824 | + | |
| 3825 | + | |
| 3826 | + | |
| 3827 | + | |
| 3828 | + | |
| 3829 | + | |
| 3830 | + | |
| 3831 | + | |
| 3832 | + | |
| 3833 | + | |
| 3834 | + | |
| 3835 | + | |
| 3836 | + | |
| 3837 | + | |
| 3838 | + | |
| 3839 | + | |
| 3840 | + | |
| 3841 | + | |
| 3842 | + | |
| 3843 | + | |
| 3844 | + | |
| 3845 | + | |
| 3846 | + | |
| 3847 | + | |
| 3848 | + | |
| 3849 | + | |
| 3850 | + | |
| 3851 | + | |
| 3852 | + | |
| 3853 | + | |
| 3854 | + | |
| 3855 | + | |
| 3856 | + | |
| 3857 | + | |
| 3858 | + | |
| 3859 | + | |
| 3860 | + | |
| 3861 | + | |
| 3862 | + | |
| 3863 | + | |
| 3864 | + | |
| 3865 | + | |
| 3866 | + | |
| 3867 | + | |
| 3868 | + | |
| 3869 | + | |
| 3870 | + | |
| 3871 | + | |
3788 | 3872 | | |
3789 | 3873 | | |
3790 | 3874 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
169 | 169 | | |
170 | 170 | | |
171 | 171 | | |
172 | | - | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
173 | 178 | | |
174 | 179 | | |
175 | 180 | | |
| |||
362 | 367 | | |
363 | 368 | | |
364 | 369 | | |
| 370 | + | |
| 371 | + | |
| 372 | + | |
| 373 | + | |
| 374 | + | |
| 375 | + | |
| 376 | + | |
| 377 | + | |
| 378 | + | |
| 379 | + | |
| 380 | + | |
| 381 | + | |
| 382 | + | |
365 | 383 | | |
366 | 384 | | |
367 | 385 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
422 | 422 | | |
423 | 423 | | |
424 | 424 | | |
425 | | - | |
| 425 | + | |
| 426 | + | |
| 427 | + | |
| 428 | + | |
| 429 | + | |
| 430 | + | |
| 431 | + | |
| 432 | + | |
| 433 | + | |
| 434 | + | |
| 435 | + | |
| 436 | + | |
| 437 | + | |
| 438 | + | |
426 | 439 | | |
427 | 440 | | |
| 441 | + | |
| 442 | + | |
| 443 | + | |
| 444 | + | |
428 | 445 | | |
429 | 446 | | |
430 | 447 | | |
431 | 448 | | |
432 | 449 | | |
| 450 | + | |
| 451 | + | |
| 452 | + | |
| 453 | + | |
| 454 | + | |
| 455 | + | |
| 456 | + | |
| 457 | + | |
433 | 458 | | |
434 | 459 | | |
435 | | - | |
436 | | - | |
| 460 | + | |
| 461 | + | |
| 462 | + | |
| 463 | + | |
| 464 | + | |
| 465 | + | |
437 | 466 | | |
438 | 467 | | |
439 | 468 | | |
| |||
0 commit comments