Commit aeb92b5
Set aside the slots recovery cannot rescue, instead of failing
The full-dictionary rebuild and the unreplayable-slot quarantine answer
two halves of the same question and have to be ordered, not merged.
Rebuilding the dictionary from the surviving frames' own delta sections
rescues most of the slots that used to fail, so it must run FIRST -- a
quarantine that pre-judged the slot on its own coverage arithmetic would
set aside slots recovery can still replay in full, and strand data that
drains perfectly.
What it cannot rescue it still throws on, and that throw still escaped
build(). senderId is stable and a not-fully-drained slot is retained on
close, so every retry re-recovered the same slot and threw again: the
application could not construct a Sender at all, and so could not even
BUFFER new rows. One already-lost batch became an unbounded outage of
everything after it, which inverts the guarantee store-and-forward
exists to give.
So seedGlobalDictionaryFromPersisted is now the single authority on
whether a slot is replayable -- it is the only code that has tried every
source of truth -- and its give-up is typed. build() waits for that
verdict rather than forming its own, and on it sets the slot aside: the
bytes are kept for forensics and resend, the .failed sentinel tells the
orphan drainer the copy is human-in-the-loop, and the producer continues
on a clean slot. The engine's own isRecoveredDictionaryIncomplete()
guess goes away with it.
Not one frame of a set-aside slot ever reaches the wire; that safety
property is unchanged and still asserted.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>1 parent 521b48d commit aeb92b5
5 files changed
Lines changed: 214 additions & 59 deletions
File tree
- core/src
- main/java/io/questdb/client
- cutlass/qwp/client
- sf/cursor
- test/java/io/questdb/client/test/cutlass/qwp/client
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
40 | 40 | | |
41 | 41 | | |
42 | 42 | | |
| 43 | + | |
43 | 44 | | |
44 | 45 | | |
45 | 46 | | |
| |||
1560 | 1561 | | |
1561 | 1562 | | |
1562 | 1563 | | |
1563 | | - | |
1564 | | - | |
1565 | | - | |
1566 | | - | |
1567 | | - | |
1568 | 1564 | | |
1569 | 1565 | | |
1570 | 1566 | | |
| |||
1576 | 1572 | | |
1577 | 1573 | | |
1578 | 1574 | | |
1579 | | - | |
| 1575 | + | |
| 1576 | + | |
| 1577 | + | |
| 1578 | + | |
| 1579 | + | |
| 1580 | + | |
| 1581 | + | |
| 1582 | + | |
| 1583 | + | |
1580 | 1584 | | |
1581 | 1585 | | |
1582 | 1586 | | |
| |||
1603 | 1607 | | |
1604 | 1608 | | |
1605 | 1609 | | |
| 1610 | + | |
| 1611 | + | |
| 1612 | + | |
| 1613 | + | |
| 1614 | + | |
| 1615 | + | |
| 1616 | + | |
| 1617 | + | |
| 1618 | + | |
| 1619 | + | |
| 1620 | + | |
| 1621 | + | |
| 1622 | + | |
| 1623 | + | |
| 1624 | + | |
| 1625 | + | |
| 1626 | + | |
| 1627 | + | |
| 1628 | + | |
| 1629 | + | |
| 1630 | + | |
| 1631 | + | |
| 1632 | + | |
| 1633 | + | |
| 1634 | + | |
| 1635 | + | |
1606 | 1636 | | |
1607 | 1637 | | |
1608 | 1638 | | |
| |||
1613 | 1643 | | |
1614 | 1644 | | |
1615 | 1645 | | |
| 1646 | + | |
1616 | 1647 | | |
1617 | 1648 | | |
1618 | 1649 | | |
| |||
3001 | 3032 | | |
3002 | 3033 | | |
3003 | 3034 | | |
3004 | | - | |
| 3035 | + | |
| 3036 | + | |
3005 | 3037 | | |
3006 | 3038 | | |
3007 | | - | |
3008 | | - | |
3009 | | - | |
3010 | | - | |
3011 | | - | |
3012 | | - | |
3013 | | - | |
3014 | | - | |
3015 | | - | |
| 3039 | + | |
| 3040 | + | |
| 3041 | + | |
| 3042 | + | |
| 3043 | + | |
| 3044 | + | |
| 3045 | + | |
3016 | 3046 | | |
3017 | 3047 | | |
3018 | 3048 | | |
| |||
Lines changed: 5 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
47 | 47 | | |
48 | 48 | | |
49 | 49 | | |
| 50 | + | |
50 | 51 | | |
51 | 52 | | |
52 | 53 | | |
| |||
3926 | 3927 | | |
3927 | 3928 | | |
3928 | 3929 | | |
3929 | | - | |
| 3930 | + | |
| 3931 | + | |
| 3932 | + | |
| 3933 | + | |
3930 | 3934 | | |
3931 | 3935 | | |
3932 | 3936 | | |
| |||
Lines changed: 0 additions & 31 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
767 | 767 | | |
768 | 768 | | |
769 | 769 | | |
770 | | - | |
771 | | - | |
772 | | - | |
773 | | - | |
774 | | - | |
775 | | - | |
776 | | - | |
777 | | - | |
778 | | - | |
779 | | - | |
780 | | - | |
781 | | - | |
782 | | - | |
783 | | - | |
784 | | - | |
785 | | - | |
786 | | - | |
787 | | - | |
788 | | - | |
789 | | - | |
790 | | - | |
791 | | - | |
792 | | - | |
793 | | - | |
794 | | - | |
795 | | - | |
796 | | - | |
797 | | - | |
798 | | - | |
799 | | - | |
800 | | - | |
801 | 770 | | |
802 | 771 | | |
803 | 772 | | |
| |||
Lines changed: 51 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
0 commit comments