Commit 4278296
committed
feat(qwp): make the poison-frame threshold configurable (max_frame_rejections)
Turns CursorWebSocketSendLoop.MAX_HEAD_FRAME_REJECTIONS (renamed
DEFAULT_MAX_HEAD_FRAME_REJECTIONS = 4) into per-sender configuration:
consecutive server-active rejections (retriable NACK or non-orderly
close) of the same head-of-line frame, with no ack progress in between,
before the sender declares the frame poisoned and latches a typed
terminal instead of reconnect-replaying forever.
Configurable from every surface:
- connect string: max_frame_rejections=N (>= 1), both the hand parser
and the ConfigView path; registered as an INGRESS key in ConfigSchema,
so the QwpQueryClient accepts it as a syntactic no-op (one vocabulary,
side-owned application -- pinned by QwpConfigKeysTest for both
clients).
- programmatic: LineSenderBuilder.maxFrameRejections(int), WebSocket
only, validated >= 1.
- QuestDB facade: the config string flows through the pool to every
built Sender; an out-of-range value is rejected at build() even with
min=0 pools (QuestDBBuilderTest).
The threshold is forwarded to the cursor send loop AND to every
BackgroundDrainer (the drainer replays the owner's SF data, so it must
honor the same threshold). All existing constructors are preserved as
delegating overloads with the default.
Tests: WsSenderConfigHonoredTest drift guard (key applied, not merely
accepted); ServerErrorAckTerminalTest e2e proves max_frame_rejections=2
escalates after exactly two deliveries of the same frame instead of the
default four.1 parent 8302335 commit 4278296
11 files changed
Lines changed: 243 additions & 26 deletions
File tree
- core/src
- main/java/io/questdb/client
- cutlass/qwp/client
- sf/cursor
- impl
- test/java/io/questdb/client/test
- cutlass/qwp/client
- impl
- design
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
35 | 35 | | |
36 | 36 | | |
37 | 37 | | |
| 38 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1049 | 1049 | | |
1050 | 1050 | | |
1051 | 1051 | | |
| 1052 | + | |
1052 | 1053 | | |
1053 | 1054 | | |
1054 | 1055 | | |
| |||
1497 | 1498 | | |
1498 | 1499 | | |
1499 | 1500 | | |
| 1501 | + | |
| 1502 | + | |
| 1503 | + | |
1500 | 1504 | | |
1501 | 1505 | | |
1502 | 1506 | | |
| |||
1568 | 1572 | | |
1569 | 1573 | | |
1570 | 1574 | | |
1571 | | - | |
| 1575 | + | |
| 1576 | + | |
1572 | 1577 | | |
1573 | 1578 | | |
1574 | 1579 | | |
| |||
2417 | 2422 | | |
2418 | 2423 | | |
2419 | 2424 | | |
| 2425 | + | |
| 2426 | + | |
| 2427 | + | |
| 2428 | + | |
| 2429 | + | |
| 2430 | + | |
| 2431 | + | |
| 2432 | + | |
| 2433 | + | |
| 2434 | + | |
| 2435 | + | |
| 2436 | + | |
| 2437 | + | |
| 2438 | + | |
| 2439 | + | |
| 2440 | + | |
| 2441 | + | |
| 2442 | + | |
| 2443 | + | |
| 2444 | + | |
| 2445 | + | |
2420 | 2446 | | |
2421 | 2447 | | |
2422 | 2448 | | |
| |||
3342 | 3368 | | |
3343 | 3369 | | |
3344 | 3370 | | |
| 3371 | + | |
| 3372 | + | |
| 3373 | + | |
| 3374 | + | |
| 3375 | + | |
| 3376 | + | |
3345 | 3377 | | |
3346 | 3378 | | |
3347 | 3379 | | |
| |||
3607 | 3639 | | |
3608 | 3640 | | |
3609 | 3641 | | |
| 3642 | + | |
| 3643 | + | |
| 3644 | + | |
3610 | 3645 | | |
3611 | 3646 | | |
3612 | 3647 | | |
| |||
3781 | 3816 | | |
3782 | 3817 | | |
3783 | 3818 | | |
| 3819 | + | |
3784 | 3820 | | |
3785 | 3821 | | |
3786 | 3822 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
205 | 205 | | |
206 | 206 | | |
207 | 207 | | |
208 | | - | |
| 208 | + | |
209 | 209 | | |
210 | 210 | | |
211 | 211 | | |
| |||
Lines changed: 49 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
281 | 281 | | |
282 | 282 | | |
283 | 283 | | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
284 | 287 | | |
285 | 288 | | |
286 | 289 | | |
| |||
620 | 623 | | |
621 | 624 | | |
622 | 625 | | |
623 | | - | |
| 626 | + | |
| 627 | + | |
624 | 628 | | |
625 | 629 | | |
626 | 630 | | |
| |||
643 | 647 | | |
644 | 648 | | |
645 | 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 | + | |
646 | 689 | | |
647 | 690 | | |
648 | 691 | | |
| |||
658 | 701 | | |
659 | 702 | | |
660 | 703 | | |
| 704 | + | |
661 | 705 | | |
662 | 706 | | |
663 | 707 | | |
| |||
2308 | 2352 | | |
2309 | 2353 | | |
2310 | 2354 | | |
2311 | | - | |
| 2355 | + | |
| 2356 | + | |
2312 | 2357 | | |
2313 | 2358 | | |
2314 | 2359 | | |
| |||
3158 | 3203 | | |
3159 | 3204 | | |
3160 | 3205 | | |
3161 | | - | |
| 3206 | + | |
| 3207 | + | |
3162 | 3208 | | |
3163 | 3209 | | |
3164 | 3210 | | |
| |||
Lines changed: 31 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
126 | 126 | | |
127 | 127 | | |
128 | 128 | | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
129 | 132 | | |
130 | 133 | | |
131 | 134 | | |
| |||
137 | 140 | | |
138 | 141 | | |
139 | 142 | | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
140 | 168 | | |
141 | 169 | | |
142 | 170 | | |
| |||
147 | 175 | | |
148 | 176 | | |
149 | 177 | | |
| 178 | + | |
150 | 179 | | |
151 | 180 | | |
152 | 181 | | |
| |||
506 | 535 | | |
507 | 536 | | |
508 | 537 | | |
509 | | - | |
| 538 | + | |
| 539 | + | |
510 | 540 | | |
511 | 541 | | |
512 | 542 | | |
| |||
0 commit comments