Commit 8fd9ad1
Tidy catch-up comments and harden two edges
Four minor cleanups on the delta symbol-dictionary catch-up, all
behaviour-preserving on every reachable path:
- The sentDict* field comment said the catch-up mirror is memory-mode
only; it is also seeded and used in disk mode on a recovered /
orphan-drained slot. Corrected.
- positionCursorAt's javadoc said it runs after nextWireSeq was reset
to 0, but the catch-up path leaves nextWireSeq past the frames it
emitted. Corrected to describe setWireBaselineWithCatchUp anchoring
the wire baseline; the method only moves the byte cursor.
- The recovery-seed constructor set sentDictCount = pd.size() outside
the loadedEntriesLen > 0 block. A recovered slot always has entries
when size > 0, so the result is unchanged, but coupling the count to
the mirror bytes stops sentDictCount ever claiming symbols the mirror
does not hold.
- sendDictCatchUp used Integer.MAX_VALUE as the no-cap per-frame
budget, so sendCatchUpChunk's int frameLen could overflow on a
multi-GB dictionary. Bound it by MAX_SENT_DICT_BYTES, the same
ceiling ensureSentDictCapacity enforces. Unreachable at real
cardinality (~200M+ symbols); defensive.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>1 parent ff79b72 commit 8fd9ad1
1 file changed
Lines changed: 20 additions & 6 deletions
File tree
- core/src/main/java/io/questdb/client/cutlass/qwp/client/sf/cursor
Lines changed: 20 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
186 | 186 | | |
187 | 187 | | |
188 | 188 | | |
189 | | - | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
190 | 192 | | |
191 | 193 | | |
192 | 194 | | |
| |||
532 | 534 | | |
533 | 535 | | |
534 | 536 | | |
| 537 | + | |
| 538 | + | |
| 539 | + | |
| 540 | + | |
| 541 | + | |
535 | 542 | | |
536 | | - | |
537 | 543 | | |
538 | 544 | | |
539 | 545 | | |
| |||
1784 | 1790 | | |
1785 | 1791 | | |
1786 | 1792 | | |
1787 | | - | |
1788 | | - | |
| 1793 | + | |
| 1794 | + | |
| 1795 | + | |
| 1796 | + | |
| 1797 | + | |
1789 | 1798 | | |
1790 | 1799 | | |
1791 | 1800 | | |
| |||
2133 | 2142 | | |
2134 | 2143 | | |
2135 | 2144 | | |
2136 | | - | |
2137 | | - | |
| 2145 | + | |
| 2146 | + | |
| 2147 | + | |
| 2148 | + | |
| 2149 | + | |
| 2150 | + | |
| 2151 | + | |
2138 | 2152 | | |
2139 | 2153 | | |
2140 | 2154 | | |
| |||
0 commit comments