Commit 80dabaa
Name designated timestamps in QWP auto-create
QWP senders let callers name the designated timestamp column that the
server creates when it auto-creates a missing table. The sender API
exposes the hint through a Sender.TableOptions flyweight obtained via
sender.table(name).tableOptions().designatedTimestamp(col), keeping
Sender itself free of flat per-option methods so future create-time
hints (partitioning, storage policies) can land beside it.
The wire encoding sets header flag 0x20 and appends a per-table TLV
options trailer (tag 0x01 = designated timestamp name) plus a u32
length footer after the table blocks. Old servers ignore the unknown
flag and the trailing bytes, so frames degrade to the conventional
timestamp column name; when no hint is set the emitted bytes stay
byte-identical to the legacy encoding, which a golden-bytes test pins.
Both the WebSocket and UDP transports carry the trailer, and
store-and-forward replays the self-describing frames safely against
older servers.
The WebSocket client reads the X-QWP-Table-Options capability header
during the upgrade and logs one warning when a configured hint reaches
a server that does not advertise support. ILP senders reject the API.
The hint is sticky per table, validated to 127 UTF-8 bytes, and
re-declarable while a table buffer holds no rows, so pooled sender
borrowers can re-declare it instead of hitting an unclearable
conflict. The pooled sender guards stale handles behind its lease
generation. Tests cover trailer layouts and mixed presence, UDP
framing, upgrade-header parsing, stale and retained flyweight
references, options-only rows, and lease rejection.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>1 parent f47859b commit 80dabaa
17 files changed
Lines changed: 773 additions & 8 deletions
File tree
- core/src
- main/java/io/questdb/client
- cutlass
- http/client
- qwp
- client
- protocol
- impl
- test/java/io/questdb/client/test
- cutlass
- http/client
- line
- qwp
- client
- protocol
- impl
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
742 | 742 | | |
743 | 743 | | |
744 | 744 | | |
| 745 | + | |
| 746 | + | |
| 747 | + | |
| 748 | + | |
| 749 | + | |
| 750 | + | |
| 751 | + | |
| 752 | + | |
| 753 | + | |
| 754 | + | |
| 755 | + | |
| 756 | + | |
| 757 | + | |
| 758 | + | |
| 759 | + | |
| 760 | + | |
| 761 | + | |
| 762 | + | |
| 763 | + | |
745 | 764 | | |
746 | 765 | | |
747 | 766 | | |
| |||
837 | 856 | | |
838 | 857 | | |
839 | 858 | | |
| 859 | + | |
| 860 | + | |
| 861 | + | |
| 862 | + | |
| 863 | + | |
| 864 | + | |
| 865 | + | |
| 866 | + | |
| 867 | + | |
| 868 | + | |
| 869 | + | |
| 870 | + | |
| 871 | + | |
| 872 | + | |
| 873 | + | |
| 874 | + | |
| 875 | + | |
| 876 | + | |
| 877 | + | |
| 878 | + | |
| 879 | + | |
| 880 | + | |
| 881 | + | |
| 882 | + | |
| 883 | + | |
| 884 | + | |
840 | 885 | | |
841 | 886 | | |
842 | 887 | | |
| |||
Lines changed: 44 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
83 | 83 | | |
84 | 84 | | |
85 | 85 | | |
| 86 | + | |
86 | 87 | | |
87 | 88 | | |
88 | 89 | | |
| |||
162 | 163 | | |
163 | 164 | | |
164 | 165 | | |
| 166 | + | |
165 | 167 | | |
166 | 168 | | |
167 | 169 | | |
| |||
410 | 412 | | |
411 | 413 | | |
412 | 414 | | |
| 415 | + | |
| 416 | + | |
| 417 | + | |
| 418 | + | |
| 419 | + | |
| 420 | + | |
| 421 | + | |
| 422 | + | |
413 | 423 | | |
414 | 424 | | |
415 | 425 | | |
| |||
614 | 624 | | |
615 | 625 | | |
616 | 626 | | |
| 627 | + | |
617 | 628 | | |
618 | 629 | | |
619 | 630 | | |
| |||
822 | 833 | | |
823 | 834 | | |
824 | 835 | | |
| 836 | + | |
| 837 | + | |
| 838 | + | |
| 839 | + | |
| 840 | + | |
| 841 | + | |
| 842 | + | |
| 843 | + | |
| 844 | + | |
| 845 | + | |
| 846 | + | |
| 847 | + | |
| 848 | + | |
| 849 | + | |
| 850 | + | |
| 851 | + | |
| 852 | + | |
| 853 | + | |
| 854 | + | |
| 855 | + | |
| 856 | + | |
| 857 | + | |
| 858 | + | |
| 859 | + | |
| 860 | + | |
| 861 | + | |
| 862 | + | |
| 863 | + | |
| 864 | + | |
825 | 865 | | |
826 | 866 | | |
827 | 867 | | |
| |||
1360 | 1400 | | |
1361 | 1401 | | |
1362 | 1402 | | |
| 1403 | + | |
| 1404 | + | |
| 1405 | + | |
| 1406 | + | |
1363 | 1407 | | |
1364 | 1408 | | |
1365 | 1409 | | |
| |||
Lines changed: 29 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
289 | 289 | | |
290 | 290 | | |
291 | 291 | | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
292 | 306 | | |
293 | 307 | | |
294 | 308 | | |
| |||
348 | 362 | | |
349 | 363 | | |
350 | 364 | | |
| 365 | + | |
| 366 | + | |
| 367 | + | |
| 368 | + | |
| 369 | + | |
| 370 | + | |
| 371 | + | |
| 372 | + | |
| 373 | + | |
| 374 | + | |
| 375 | + | |
| 376 | + | |
| 377 | + | |
| 378 | + | |
| 379 | + | |
351 | 380 | | |
352 | 381 | | |
353 | 382 | | |
| |||
Lines changed: 63 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
81 | 81 | | |
82 | 82 | | |
83 | 83 | | |
| 84 | + | |
84 | 85 | | |
85 | 86 | | |
86 | 87 | | |
| |||
591 | 592 | | |
592 | 593 | | |
593 | 594 | | |
| 595 | + | |
| 596 | + | |
| 597 | + | |
| 598 | + | |
| 599 | + | |
| 600 | + | |
| 601 | + | |
594 | 602 | | |
595 | 603 | | |
596 | 604 | | |
| |||
866 | 874 | | |
867 | 875 | | |
868 | 876 | | |
| 877 | + | |
| 878 | + | |
| 879 | + | |
| 880 | + | |
| 881 | + | |
| 882 | + | |
| 883 | + | |
| 884 | + | |
| 885 | + | |
869 | 886 | | |
870 | 887 | | |
871 | 888 | | |
| |||
1007 | 1024 | | |
1008 | 1025 | | |
1009 | 1026 | | |
| 1027 | + | |
1010 | 1028 | | |
1011 | 1029 | | |
1012 | 1030 | | |
| |||
1015 | 1033 | | |
1016 | 1034 | | |
1017 | 1035 | | |
| 1036 | + | |
1018 | 1037 | | |
1019 | 1038 | | |
1020 | 1039 | | |
| |||
1106 | 1125 | | |
1107 | 1126 | | |
1108 | 1127 | | |
| 1128 | + | |
| 1129 | + | |
| 1130 | + | |
1109 | 1131 | | |
1110 | 1132 | | |
1111 | 1133 | | |
| |||
1218 | 1240 | | |
1219 | 1241 | | |
1220 | 1242 | | |
1221 | | - | |
| 1243 | + | |
1222 | 1244 | | |
1223 | 1245 | | |
1224 | | - | |
| 1246 | + | |
1225 | 1247 | | |
1226 | 1248 | | |
1227 | 1249 | | |
1228 | 1250 | | |
1229 | 1251 | | |
1230 | 1252 | | |
1231 | | - | |
| 1253 | + | |
1232 | 1254 | | |
1233 | 1255 | | |
1234 | 1256 | | |
| |||
1251 | 1273 | | |
1252 | 1274 | | |
1253 | 1275 | | |
1254 | | - | |
| 1276 | + | |
1255 | 1277 | | |
1256 | 1278 | | |
1257 | 1279 | | |
| |||
1483 | 1505 | | |
1484 | 1506 | | |
1485 | 1507 | | |
| 1508 | + | |
| 1509 | + | |
| 1510 | + | |
| 1511 | + | |
| 1512 | + | |
1486 | 1513 | | |
1487 | 1514 | | |
1488 | 1515 | | |
| |||
1509 | 1536 | | |
1510 | 1537 | | |
1511 | 1538 | | |
| 1539 | + | |
| 1540 | + | |
| 1541 | + | |
| 1542 | + | |
| 1543 | + | |
| 1544 | + | |
| 1545 | + | |
| 1546 | + | |
| 1547 | + | |
| 1548 | + | |
| 1549 | + | |
| 1550 | + | |
| 1551 | + | |
| 1552 | + | |
| 1553 | + | |
| 1554 | + | |
| 1555 | + | |
| 1556 | + | |
| 1557 | + | |
| 1558 | + | |
| 1559 | + | |
| 1560 | + | |
| 1561 | + | |
| 1562 | + | |
| 1563 | + | |
| 1564 | + | |
| 1565 | + | |
| 1566 | + | |
| 1567 | + | |
| 1568 | + | |
| 1569 | + | |
| 1570 | + | |
1512 | 1571 | | |
0 commit comments