Commit c065ad4
Stop split-flush stranding a deferred prefix
flushPendingRowsSplit published each table's frame one at a time
(deferred, uncommitted) and only checked a frame against the server
batch cap after encoding it. An oversized non-first table therefore
threw after an earlier table's frame was already on the ring, where a
later commit delivered it as a partial batch -- while
resetTableBuffersAfterFlush discarded every source row. The caller saw
a failure for a batch that had partly committed.
Pre-flight every split frame's size before publishing any of them, so
the split is all-or-nothing: either every frame fits and all publish,
or none publish and it throws with nothing stranded. simBaseline
mirrors advanceSentMaxSymbolId, so a measured size equals the frame the
publish loop builds; the pass is read-only on the table buffers and
touches no delta/persist state. The cost is a second encode pass over
the split batch, already the exceptional large-batch path.
testOversizedTableSplitStrandsNothing reproduces the stranding -- it
fails on the old code with the earlier frame reaching the server -- and
passes with the pre-flight.
Also add testReconnectPreservesMonotonicDeltaBaseline: it pins that the
producer's sent-symbol watermark survives a reconnect, asserting the
first post-reconnect data frame carries a delta above the baseline
(deltaStart >= 1) rather than re-shipping the whole dictionary from 0.
The existing catch-up tests assert only that the final dictionary is
complete, which a reset-then-redefine also satisfies.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>1 parent 6cc1307 commit c065ad4
3 files changed
Lines changed: 174 additions & 15 deletions
File tree
- core/src
- main/java/io/questdb/client/cutlass/qwp/client
- test/java/io/questdb/client/test/cutlass/qwp/client
Lines changed: 44 additions & 11 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3552 | 3552 | | |
3553 | 3553 | | |
3554 | 3554 | | |
3555 | | - | |
| 3555 | + | |
| 3556 | + | |
| 3557 | + | |
| 3558 | + | |
| 3559 | + | |
| 3560 | + | |
| 3561 | + | |
| 3562 | + | |
| 3563 | + | |
| 3564 | + | |
| 3565 | + | |
| 3566 | + | |
| 3567 | + | |
| 3568 | + | |
| 3569 | + | |
| 3570 | + | |
3556 | 3571 | | |
| 3572 | + | |
3557 | 3573 | | |
3558 | 3574 | | |
3559 | 3575 | | |
3560 | 3576 | | |
3561 | 3577 | | |
3562 | 3578 | | |
3563 | | - | |
3564 | | - | |
| 3579 | + | |
| 3580 | + | |
| 3581 | + | |
| 3582 | + | |
| 3583 | + | |
| 3584 | + | |
| 3585 | + | |
| 3586 | + | |
| 3587 | + | |
| 3588 | + | |
| 3589 | + | |
| 3590 | + | |
| 3591 | + | |
| 3592 | + | |
| 3593 | + | |
| 3594 | + | |
| 3595 | + | |
| 3596 | + | |
3565 | 3597 | | |
3566 | 3598 | | |
3567 | 3599 | | |
| |||
3590 | 3622 | | |
3591 | 3623 | | |
3592 | 3624 | | |
3593 | | - | |
3594 | | - | |
3595 | | - | |
3596 | | - | |
3597 | | - | |
3598 | | - | |
3599 | | - | |
3600 | | - | |
| 3625 | + | |
| 3626 | + | |
| 3627 | + | |
| 3628 | + | |
| 3629 | + | |
| 3630 | + | |
| 3631 | + | |
| 3632 | + | |
| 3633 | + | |
3601 | 3634 | | |
3602 | 3635 | | |
3603 | 3636 | | |
| |||
Lines changed: 71 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
102 | 102 | | |
103 | 103 | | |
104 | 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 | + | |
105 | 151 | | |
106 | 152 | | |
107 | 153 | | |
| |||
332 | 378 | | |
333 | 379 | | |
334 | 380 | | |
| 381 | + | |
| 382 | + | |
| 383 | + | |
| 384 | + | |
| 385 | + | |
| 386 | + | |
| 387 | + | |
335 | 388 | | |
336 | 389 | | |
337 | 390 | | |
| |||
356 | 409 | | |
357 | 410 | | |
358 | 411 | | |
359 | | - | |
360 | | - | |
361 | | - | |
362 | | - | |
| 412 | + | |
| 413 | + | |
| 414 | + | |
| 415 | + | |
| 416 | + | |
| 417 | + | |
| 418 | + | |
| 419 | + | |
| 420 | + | |
| 421 | + | |
| 422 | + | |
| 423 | + | |
| 424 | + | |
| 425 | + | |
| 426 | + | |
| 427 | + | |
| 428 | + | |
| 429 | + | |
363 | 430 | | |
364 | 431 | | |
365 | 432 | | |
| |||
Lines changed: 59 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
| 28 | + | |
28 | 29 | | |
29 | 30 | | |
30 | 31 | | |
| |||
273 | 274 | | |
274 | 275 | | |
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 | + | |
| 324 | + | |
| 325 | + | |
| 326 | + | |
| 327 | + | |
| 328 | + | |
| 329 | + | |
| 330 | + | |
| 331 | + | |
| 332 | + | |
| 333 | + | |
| 334 | + | |
276 | 335 | | |
277 | 336 | | |
278 | 337 | | |
| |||
0 commit comments