Commit 8722bf1
committed
docs(qwp): state the recovery no-mutation guarantee exactly as strong as it is
Two in-diff comments claimed more than the code proves.
The recovery-scan comment asserted 'a failed recovery never mutates the
slot (single exception: ...sanitizeSealedResidue)'. There are more
windows where a recovery that later fails has already durably mutated:
the legacy-migration sanitize zeroes residue before SfManifest.create
(or any later step) can fail, and validated-extra cleanup plus
corrupt-file quarantine run before the active-sanitize barrier or ring
construction can fail. Restate the invariant as what the code actually
guarantees -- a failed recovery never mutates COMMITTED CHAIN BYTES --
and enumerate the windows, each confined to proven-dead zeroes or
preserve-by-rename quarantines.
The db8938e-derived javadoc claimed sanitizeTornTail runs 'only on
residue that validation proves non-load-bearing', gliding over the
resumed active with '(reclaimed by appends anyway)'. No such proof
exists for the active -- it has no successor to bound its accounting,
and past a mid-file tear its residue can hold valid-CRC frames of real
unacked payloads. Zeroing them is a deliberate POLICY (replay cannot
cross the tear; unzeroed residue risks the reseal-brick and stale-frame
resurrection hazards), not a validation-derived proof. Say so at every
site that carried the stronger wording: openExisting's javadoc, the
scan-time observe-only comment, sanitizeTornTail's contract, and the
active-sanitize call site in SegmentRing.
Comments only; no behavior change.1 parent 98b7397 commit 8722bf1
2 files changed
Lines changed: 46 additions & 20 deletions
File tree
- core/src/main/java/io/questdb/client/cutlass/qwp/client/sf/cursor
Lines changed: 28 additions & 15 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
299 | 299 | | |
300 | 300 | | |
301 | 301 | | |
302 | | - | |
303 | | - | |
304 | | - | |
305 | | - | |
306 | | - | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
| 306 | + | |
| 307 | + | |
| 308 | + | |
| 309 | + | |
| 310 | + | |
| 311 | + | |
307 | 312 | | |
308 | 313 | | |
309 | 314 | | |
| |||
375 | 380 | | |
376 | 381 | | |
377 | 382 | | |
378 | | - | |
379 | | - | |
380 | | - | |
381 | | - | |
382 | | - | |
383 | | - | |
384 | | - | |
| 383 | + | |
| 384 | + | |
| 385 | + | |
| 386 | + | |
| 387 | + | |
| 388 | + | |
| 389 | + | |
| 390 | + | |
| 391 | + | |
| 392 | + | |
| 393 | + | |
385 | 394 | | |
386 | 395 | | |
387 | 396 | | |
| |||
752 | 761 | | |
753 | 762 | | |
754 | 763 | | |
755 | | - | |
756 | | - | |
757 | | - | |
| 764 | + | |
| 765 | + | |
| 766 | + | |
| 767 | + | |
| 768 | + | |
| 769 | + | |
| 770 | + | |
758 | 771 | | |
759 | 772 | | |
760 | 773 | | |
| |||
Lines changed: 18 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
243 | 243 | | |
244 | 244 | | |
245 | 245 | | |
246 | | - | |
247 | | - | |
248 | | - | |
249 | | - | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
250 | 258 | | |
251 | 259 | | |
252 | 260 | | |
| |||
555 | 563 | | |
556 | 564 | | |
557 | 565 | | |
558 | | - | |
| 566 | + | |
| 567 | + | |
| 568 | + | |
| 569 | + | |
| 570 | + | |
| 571 | + | |
559 | 572 | | |
560 | 573 | | |
561 | 574 | | |
| |||
0 commit comments