Commit 2721f39
fix(qwp): guard header reads in recovery; drop the sparse-tail-only WARN framing
M1: openExisting reads magic/version/baseSeq before scanFrames with no guard,
so an unbacked page 0 (unflushed header on a truncate-based-allocate FS after a
crash, or a file truncated under the mapping) faults with an InternalError that
SegmentRing's per-file catch (MmapSegmentException) does not catch -- it escapes
to the outer catch (Throwable) and aborts recovery of every sibling segment.
Convert an isMmapAccessFault into a MmapSegmentException in openExisting's catch
so only that one .sfa is skipped. Adds a portable regression test.
M2: the scanFrames in-mapping-fault WARN framed the outcome as "Expected when a
prior session left a sparse segment tail", downplaying a possible mid-file media
error. Reword it to state frames beyond the fault are discarded and that a bad
sector is indistinguishable here, and document that tornTailBytes() reports 0
for an unbacked bail-out region by design.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>1 parent 779dfd0 commit 2721f39
2 files changed
Lines changed: 63 additions & 2 deletions
File tree
- core/src
- main/java/io/questdb/client/cutlass/qwp/client/sf/cursor
- test/java/io/questdb/client/test/cutlass/qwp/client/sf/cursor
Lines changed: 30 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
310 | 310 | | |
311 | 311 | | |
312 | 312 | | |
| 313 | + | |
| 314 | + | |
| 315 | + | |
| 316 | + | |
| 317 | + | |
| 318 | + | |
| 319 | + | |
| 320 | + | |
| 321 | + | |
| 322 | + | |
| 323 | + | |
| 324 | + | |
| 325 | + | |
| 326 | + | |
| 327 | + | |
| 328 | + | |
| 329 | + | |
313 | 330 | | |
314 | 331 | | |
315 | 332 | | |
| |||
502 | 519 | | |
503 | 520 | | |
504 | 521 | | |
| 522 | + | |
| 523 | + | |
| 524 | + | |
| 525 | + | |
| 526 | + | |
| 527 | + | |
| 528 | + | |
505 | 529 | | |
506 | 530 | | |
507 | 531 | | |
| |||
595 | 619 | | |
596 | 620 | | |
597 | 621 | | |
598 | | - | |
599 | | - | |
| 622 | + | |
| 623 | + | |
| 624 | + | |
| 625 | + | |
| 626 | + | |
| 627 | + | |
600 | 628 | | |
601 | 629 | | |
602 | 630 | | |
| |||
Lines changed: 33 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
| 28 | + | |
28 | 29 | | |
29 | 30 | | |
30 | 31 | | |
| |||
37 | 38 | | |
38 | 39 | | |
39 | 40 | | |
| 41 | + | |
40 | 42 | | |
41 | 43 | | |
42 | 44 | | |
| |||
176 | 178 | | |
177 | 179 | | |
178 | 180 | | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
179 | 212 | | |
180 | 213 | | |
181 | 214 | | |
| |||
0 commit comments