Commit 1699c0a
Snapshot server batch cap once in sendRow
sendRow read the volatile serverMaxBatchSize three times while
checking one row against the cap. The I/O thread lowers that field
mid-stream on a failover -- clearing it to 0 when the new node
advertises no cap -- so a read torn across the guard and the throw
could reject the row against a "cap" of 0, which means "no cap": the
row rolled back and a retry succeeded, but the producer still saw a
spurious "row too large for server batch cap" error.
Snapshot the field into a local once, exactly as flushPendingRows
already does, so the guard, the comparison and the message all use
one consistent value.
Also add QwpWebSocketSenderTest coverage for the per-row cap guard,
which had none: an oversized row under a positive cap throws and
rolls back to zero rows, and a large row commits when the server
advertises no cap (the invariant the snapshot protects).
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>1 parent 0a3010f commit 1699c0a
2 files changed
Lines changed: 80 additions & 3 deletions
File tree
- core/src
- main/java/io/questdb/client/cutlass/qwp/client
- test/java/io/questdb/client/test/cutlass/qwp/client
Lines changed: 9 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4155 | 4155 | | |
4156 | 4156 | | |
4157 | 4157 | | |
4158 | | - | |
| 4158 | + | |
| 4159 | + | |
| 4160 | + | |
| 4161 | + | |
| 4162 | + | |
| 4163 | + | |
| 4164 | + | |
4159 | 4165 | | |
4160 | | - | |
| 4166 | + | |
4161 | 4167 | | |
4162 | 4168 | | |
4163 | | - | |
| 4169 | + | |
4164 | 4170 | | |
4165 | 4171 | | |
4166 | 4172 | | |
| |||
Lines changed: 71 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
624 | 624 | | |
625 | 625 | | |
626 | 626 | | |
| 627 | + | |
| 628 | + | |
| 629 | + | |
| 630 | + | |
| 631 | + | |
| 632 | + | |
| 633 | + | |
| 634 | + | |
| 635 | + | |
| 636 | + | |
| 637 | + | |
| 638 | + | |
| 639 | + | |
| 640 | + | |
| 641 | + | |
| 642 | + | |
| 643 | + | |
| 644 | + | |
| 645 | + | |
| 646 | + | |
| 647 | + | |
| 648 | + | |
| 649 | + | |
| 650 | + | |
| 651 | + | |
| 652 | + | |
| 653 | + | |
| 654 | + | |
| 655 | + | |
| 656 | + | |
| 657 | + | |
| 658 | + | |
| 659 | + | |
| 660 | + | |
| 661 | + | |
| 662 | + | |
| 663 | + | |
| 664 | + | |
| 665 | + | |
| 666 | + | |
| 667 | + | |
| 668 | + | |
| 669 | + | |
| 670 | + | |
| 671 | + | |
| 672 | + | |
| 673 | + | |
| 674 | + | |
| 675 | + | |
| 676 | + | |
| 677 | + | |
| 678 | + | |
| 679 | + | |
| 680 | + | |
| 681 | + | |
| 682 | + | |
| 683 | + | |
| 684 | + | |
| 685 | + | |
| 686 | + | |
| 687 | + | |
| 688 | + | |
| 689 | + | |
| 690 | + | |
| 691 | + | |
| 692 | + | |
| 693 | + | |
| 694 | + | |
| 695 | + | |
| 696 | + | |
| 697 | + | |
627 | 698 | | |
628 | 699 | | |
629 | 700 | | |
| |||
0 commit comments