Commit ed48d4e
Assert the facade length injection drove the mapping
The routed header-fault test asserted only that recovery returned no
ring. But SegmentRing.openExisting rebuilds the segment path as
sfDir + "/" + name and swallows the per-file MmapSegmentException, so
the test could no longer see why the skip happened. If the facade's
targetPath ever stopped matching that rebuilt path, openExisting would
read the real length 0, throw "file shorter than header" before the
mmap-fault guard, still skip, and still return null -- the test would
pass even with the guard reverted, silently gutting the only portable
fail-on-revert guard.
MapPastEofFacade now records whether it served the inflated length for
its target path, and the test asserts it did. That proves the
beyond-EOF fault, not a short-file throw, drove the skip, restoring the
structural guarantee the pre-routing reference-identity form had. A
mutation that breaks the path match now fails loudly at the assertion
instead of passing green (verified: it fails at the new assertTrue with
the coupling broken, and passes on JDK 11 and JDK 17 intact).
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>1 parent 8c53638 commit ed48d4e
1 file changed
Lines changed: 19 additions & 2 deletions
File tree
- core/src/test/java/io/questdb/client/test/cutlass/qwp/client/sf/cursor
Lines changed: 19 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
317 | 317 | | |
318 | 318 | | |
319 | 319 | | |
320 | | - | |
| 320 | + | |
321 | 321 | | |
322 | 322 | | |
323 | 323 | | |
324 | 324 | | |
| 325 | + | |
| 326 | + | |
| 327 | + | |
| 328 | + | |
| 329 | + | |
| 330 | + | |
| 331 | + | |
| 332 | + | |
| 333 | + | |
325 | 334 | | |
326 | 335 | | |
327 | 336 | | |
| |||
394 | 403 | | |
395 | 404 | | |
396 | 405 | | |
| 406 | + | |
| 407 | + | |
| 408 | + | |
| 409 | + | |
397 | 410 | | |
398 | 411 | | |
399 | 412 | | |
| |||
469 | 482 | | |
470 | 483 | | |
471 | 484 | | |
472 | | - | |
| 485 | + | |
| 486 | + | |
| 487 | + | |
| 488 | + | |
| 489 | + | |
473 | 490 | | |
474 | 491 | | |
475 | 492 | | |
| |||
0 commit comments