Commit 50fc218
Give the catch-up cap gap a settle budget
Two hardening fixes to the split/catch-up paths for heterogeneous /
rolling-cap clusters.
Catch-up cap-gap settle budget (M1): when a symbol-dict catch-up entry
is too large for the fresh server's advertised batch cap, sendDictCatchUp
latched a terminal on first sight. A homogeneous cluster never trips this
(an entry that fit its data frame under a cap always fits its bare
catch-up frame under that same cap), but a failover to a smaller-cap node
could kill the sender for an entry an earlier node accepted. It now
retries across MAX_CATCHUP_CAP_GAP_ATTEMPTS consecutive reconnects
(throwing a retriable CatchUpSendException, no recordFatal), riding out
the transient window until a larger-cap node returns; only a persistent
gap latches the terminal. A successful catch-up resets the budget, and a
transient reconnect never reaches the catch-up so it neither increments
nor burns it. Matches the orphan drainer's durable-ack settle budget.
Split-flush cap snapshot (M2): flushPendingRows now snapshots the
volatile serverMaxBatchSize once and threads it into flushPendingRowsSplit
for both the pre-flight sizing and the publish-loop assert. A mid-flush
failover (the I/O thread lowers the cap) could previously make the two
passes size against different caps, breaking the all-or-nothing guarantee
and firing the assert on a legitimate race. The next flush picks up the
new cap.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>1 parent ff2e841 commit 50fc218
4 files changed
Lines changed: 136 additions & 32 deletions
File tree
- core/src
- main/java/io/questdb/client/cutlass/qwp/client
- sf/cursor
- test/java/io/questdb/client/test/cutlass/qwp/client
- sf/cursor
Lines changed: 21 additions & 11 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3512 | 3512 | | |
3513 | 3513 | | |
3514 | 3514 | | |
3515 | | - | |
| 3515 | + | |
| 3516 | + | |
| 3517 | + | |
| 3518 | + | |
| 3519 | + | |
| 3520 | + | |
| 3521 | + | |
| 3522 | + | |
| 3523 | + | |
3516 | 3524 | | |
3517 | 3525 | | |
3518 | 3526 | | |
3519 | | - | |
| 3527 | + | |
3520 | 3528 | | |
3521 | 3529 | | |
3522 | 3530 | | |
| |||
3568 | 3576 | | |
3569 | 3577 | | |
3570 | 3578 | | |
3571 | | - | |
| 3579 | + | |
3572 | 3580 | | |
3573 | | - | |
| 3581 | + | |
3574 | 3582 | | |
3575 | 3583 | | |
3576 | 3584 | | |
| |||
3613 | 3621 | | |
3614 | 3622 | | |
3615 | 3623 | | |
3616 | | - | |
| 3624 | + | |
3617 | 3625 | | |
3618 | 3626 | | |
3619 | 3627 | | |
3620 | 3628 | | |
3621 | | - | |
| 3629 | + | |
3622 | 3630 | | |
3623 | 3631 | | |
3624 | 3632 | | |
| |||
3655 | 3663 | | |
3656 | 3664 | | |
3657 | 3665 | | |
3658 | | - | |
3659 | | - | |
3660 | | - | |
3661 | | - | |
| 3666 | + | |
| 3667 | + | |
| 3668 | + | |
| 3669 | + | |
| 3670 | + | |
| 3671 | + | |
3662 | 3672 | | |
3663 | | - | |
| 3673 | + | |
3664 | 3674 | | |
3665 | 3675 | | |
3666 | 3676 | | |
| |||
Lines changed: 48 additions & 15 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
133 | 133 | | |
134 | 134 | | |
135 | 135 | | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
136 | 148 | | |
137 | 149 | | |
138 | 150 | | |
| |||
206 | 218 | | |
207 | 219 | | |
208 | 220 | | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
209 | 227 | | |
210 | 228 | | |
211 | 229 | | |
| |||
2243 | 2261 | | |
2244 | 2262 | | |
2245 | 2263 | | |
2246 | | - | |
2247 | | - | |
2248 | | - | |
2249 | | - | |
2250 | | - | |
| 2264 | + | |
| 2265 | + | |
| 2266 | + | |
| 2267 | + | |
| 2268 | + | |
2251 | 2269 | | |
2252 | | - | |
2253 | | - | |
2254 | | - | |
2255 | | - | |
2256 | | - | |
2257 | | - | |
2258 | | - | |
2259 | | - | |
| 2270 | + | |
| 2271 | + | |
| 2272 | + | |
| 2273 | + | |
| 2274 | + | |
| 2275 | + | |
| 2276 | + | |
| 2277 | + | |
| 2278 | + | |
| 2279 | + | |
| 2280 | + | |
| 2281 | + | |
| 2282 | + | |
| 2283 | + | |
2260 | 2284 | | |
2261 | 2285 | | |
2262 | | - | |
2263 | | - | |
| 2286 | + | |
| 2287 | + | |
| 2288 | + | |
| 2289 | + | |
| 2290 | + | |
| 2291 | + | |
| 2292 | + | |
| 2293 | + | |
2264 | 2294 | | |
2265 | 2295 | | |
2266 | 2296 | | |
| |||
2279 | 2309 | | |
2280 | 2310 | | |
2281 | 2311 | | |
| 2312 | + | |
| 2313 | + | |
| 2314 | + | |
2282 | 2315 | | |
2283 | 2316 | | |
2284 | 2317 | | |
| |||
Lines changed: 11 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
212 | 212 | | |
213 | 213 | | |
214 | 214 | | |
215 | | - | |
216 | | - | |
217 | | - | |
218 | | - | |
219 | | - | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
220 | 224 | | |
221 | 225 | | |
222 | 226 | | |
| |||
234 | 238 | | |
235 | 239 | | |
236 | 240 | | |
237 | | - | |
| 241 | + | |
| 242 | + | |
238 | 243 | | |
239 | 244 | | |
240 | 245 | | |
| |||
Lines changed: 56 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
| 29 | + | |
29 | 30 | | |
30 | 31 | | |
31 | 32 | | |
| |||
265 | 266 | | |
266 | 267 | | |
267 | 268 | | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
| 306 | + | |
| 307 | + | |
| 308 | + | |
| 309 | + | |
| 310 | + | |
| 311 | + | |
| 312 | + | |
| 313 | + | |
| 314 | + | |
| 315 | + | |
| 316 | + | |
| 317 | + | |
| 318 | + | |
| 319 | + | |
| 320 | + | |
| 321 | + | |
| 322 | + | |
| 323 | + | |
268 | 324 | | |
269 | 325 | | |
270 | 326 | | |
| |||
0 commit comments