Commit 6c6dc40
Latch a terminal on sent-dict mirror overflow
ensureSentDictCapacity threw a bare LineSenderException when the
lifetime-monotonic sent-dictionary mirror would exceed
MAX_SENT_DICT_BYTES. accumulateSentDict runs after the frame's
sendBinary, so that throw unwound to ioLoop -> fail() -> connectLoop
with running still true, which reconnected and replayed the same frame;
the mirror never shrinks, so the replay re-overflowed and the loop
reconnected again -- an unbounded livelock instead of the loud failure
the ceiling promises.
recordFatal now flips running=false before the throw, so connectLoop's
!running guard winds the loop down and checkError() surfaces the
terminal to the producer. This matches sendCatchUpChunk's guard for the
same ceiling. The throw stays, to unwind past the pending copyMemory.
The path needs ~100M+ distinct symbols on one connection to reach, so
it is defensive; the producer's GlobalSymbolDictionary would OOM first.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>1 parent 94e3b1d commit 6c6dc40
1 file changed
Lines changed: 12 additions & 1 deletion
File tree
- core/src/main/java/io/questdb/client/cutlass/qwp/client/sf/cursor
Lines changed: 12 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2137 | 2137 | | |
2138 | 2138 | | |
2139 | 2139 | | |
2140 | | - | |
| 2140 | + | |
| 2141 | + | |
| 2142 | + | |
| 2143 | + | |
| 2144 | + | |
| 2145 | + | |
| 2146 | + | |
| 2147 | + | |
| 2148 | + | |
| 2149 | + | |
2141 | 2150 | | |
| 2151 | + | |
| 2152 | + | |
2142 | 2153 | | |
2143 | 2154 | | |
2144 | 2155 | | |
| |||
0 commit comments