Commit 2fdbbf9
Fix catch-up terminal on a homogeneous batch cap
The reconnect symbol-dictionary catch-up latched a terminal for any
entry exceeding the packing budget (cap - HEADER_SIZE - 16). That
reserve is larger than the minimal data-frame overhead, so a symbol the
producer had already shipped under a given cap could exceed the budget
and trip the terminal on reconnect -- permanently hard-failing a running
producer on a homogeneous single-cap cluster, the exact failure the
store-and-forward path exists to survive.
sendDictCatchUp now tests the actual solo catch-up frame (header + the
entry's delta varints + the entry bytes) against the cap. That frame is
always smaller than the data frame that already carried the entry, so an
accepted symbol always re-registers on the same cap; a genuinely
oversized entry on a shrunk (heterogeneous) cap still terminates. The
conservative packing budget stays, used only for multi-entry chunk
splitting.
Add a fixed-cap regression test: a 173-char symbol under a fixed cap of
200 is accepted, then re-registers gap-free across a reconnect. It fails
before this change, where the reverted condition terminates a frame that
fits the cap.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>1 parent fdd7141 commit 2fdbbf9
2 files changed
Lines changed: 91 additions & 8 deletions
File tree
- core/src
- main/java/io/questdb/client/cutlass/qwp/client/sf/cursor
- test/java/io/questdb/client/test/cutlass/qwp/client
Lines changed: 30 additions & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2171 | 2171 | | |
2172 | 2172 | | |
2173 | 2173 | | |
2174 | | - | |
2175 | | - | |
2176 | | - | |
2177 | | - | |
2178 | | - | |
2179 | | - | |
| 2174 | + | |
| 2175 | + | |
| 2176 | + | |
| 2177 | + | |
| 2178 | + | |
| 2179 | + | |
| 2180 | + | |
| 2181 | + | |
| 2182 | + | |
| 2183 | + | |
| 2184 | + | |
| 2185 | + | |
| 2186 | + | |
| 2187 | + | |
| 2188 | + | |
2180 | 2189 | | |
2181 | 2190 | | |
2182 | 2191 | | |
| |||
2192 | 2201 | | |
2193 | 2202 | | |
2194 | 2203 | | |
2195 | | - | |
| 2204 | + | |
| 2205 | + | |
| 2206 | + | |
| 2207 | + | |
| 2208 | + | |
| 2209 | + | |
| 2210 | + | |
| 2211 | + | |
| 2212 | + | |
| 2213 | + | |
| 2214 | + | |
| 2215 | + | |
| 2216 | + | |
| 2217 | + | |
2196 | 2218 | | |
2197 | 2219 | | |
2198 | 2220 | | |
| |||
2209 | 2231 | | |
2210 | 2232 | | |
2211 | 2233 | | |
2212 | | - | |
| 2234 | + | |
2213 | 2235 | | |
2214 | 2236 | | |
2215 | 2237 | | |
| |||
Lines changed: 61 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
99 | 99 | | |
100 | 100 | | |
101 | 101 | | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
102 | 163 | | |
103 | 164 | | |
104 | 165 | | |
| |||
0 commit comments