Skip to content

Commit f47f855

Browse files
committed
Merge origin/main into qwip_go
Brings in the mainline QWP work (#66 connect-string key consolidation, #67 connection recycle) on top of the qwip_go feature branch (delta symbol dictionary, NACK policy v2, the QuestDB facade, durable-ack). Conflict resolution notes: - NACK policy: kept v2 (PolicyRetriable/Terminal + poison-frame detector); main's PolicyHalt/DropAndContinue is superseded and undefined post-merge. - Config keys: adopted main's #66 policy per request — sf_max_segment_bytes rename, canonicalConfigKey aliases, duplicate-key rejection, transaction / UDP-key handling, and the strict QWP key vocabulary (gorilla, in_flight_window, token_x/token_y, protocol_version, egress auth are rejected/removed). Kept ours' orthogonal features (facade pool keys, durable-ack, connection-listener storage, delta symbol dictionary). - connect_timeout: combined both branches' edge-case fixes (reject negatives, floor sub-millisecond positives to 1ms). - README: dropped the duplicated legacy QWP section in favour of the reorganized facade-first structure. go build ./..., go vet ./..., and the unit suite all pass.
2 parents 47479e8 + d1fd2bd commit f47f855

26 files changed

Lines changed: 713 additions & 525 deletions

CLAUDE.md

Lines changed: 3 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,8 @@ Go client library for QuestDB ingestion. Three transports:
1717

1818
Module path: `github.com/questdb/go-questdb-client/v4` — the `/v4` segment is
1919
load-bearing when importing within this repo. Minimum Go: 1.23 (go.mod pins
20-
`go 1.23` with a `1.24.4` toolchain).
20+
`go 1.23` with no `toolchain` directive; CI's `1.23.x`/`1.24.x` matrix runs
21+
under `GOTOOLCHAIN=local`).
2122

2223
## Commands
2324

@@ -153,23 +154,6 @@ write-ahead persists a frame's new symbols before publishing it; a host-crash
153154
tear (frame delta start > recovered dict size) is caught pre-send by the
154155
**torn-dict guard**, a terminal `PROTOCOL_VIOLATION` ("resend required").
155156

156-
`WithInFlightWindow(n)` / `in_flight_window=n` is **retained but a no-op** in
157-
the cursor architecture — backpressure is governed by the engine's segment-ring
158-
+ `engineAppendBlocking` deadline.
159-
160-
### Java-parity QWP knobs (not in connect-string.md)
161-
162-
These connect-string keys are recognised by the Java client
163-
(`Sender.java`) but are not listed in the
164-
[native-client spec](https://github.com/questdb/questdb-enterprise/blob/main/questdb/docs/qwp/connect-string.md).
165-
We accept them for Java-parity portability — a connect string that
166-
works on the Java client must work here. None should ever be
167-
considered for removal without a matching change in Java:
168-
169-
- `gorilla=on|off` — gates the Gorilla timestamp encoding in
170-
`qwp_encoder.go` (FLAG_GORILLA). Default `on`.
171-
- `in_flight_window=N` — see the "retained but a no-op" note above.
172-
173157
`close_timeout=N` (millisecond integer) was a v4.0–v4.5 Go-only key
174158
for the memory-mode close path. The cursor architecture unified
175159
memory and SF onto `close_flush_timeout_millis`, which the spec
@@ -210,7 +194,7 @@ Orphan-slot adoption (SF mode, `drain_orphans=on`) is implemented in
210194
`qwp_sf_orphan.go` + `qwp_sf_drainer.go` + `qwp_sf_round_walk.go`; drainers run
211195
in dedicated goroutines and are visible via `QwpSender.BackgroundDrainers()`.
212196

213-
### Error handling (NACK policy v2 — no drop, no lists, no dead senders)
197+
### Error handling (no drop, no lists, no dead senders)
214198

215199
QWP server rejections surface as `*SenderError` (`sender_error.go` is canonical
216200
for categories + policy enum). Two paths: async callback registered via
@@ -295,10 +279,6 @@ over the generic `qwpDispatcher[T]` (`qwp_dispatcher.go`).
295279
QWP unit tests use `httptest.Server` to stand in for the QuestDB WebSocket
296280
endpoint (`newQwpTestServer` in `qwp_sender_test.go`). ILP unit tests are pure.
297281

298-
`*_integration_test.go` files need Docker — they spin up real QuestDB via
299-
testcontainers-go; HTTP/TCP suites sometimes launch haproxy via
300-
`test/haproxy.cfg`.
301-
302282
Cross-language conformance: `interop_test.go` +
303283
`test/interop/questdb-client-test` (submodule) — ILP vectors shared across
304284
QuestDB client libraries.

README.md

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -396,8 +396,6 @@ terminally against a replica.
396396

397397
Backpressure is governed by the engine's segment ring and the append deadline
398398
(`sf_append_deadline_millis`), not a fixed in-flight count.
399-
`in_flight_window` / `qdb.WithInFlightWindow(n)` is retained for compatibility
400-
but is a **no-op**.
401399

402400
### Error handling
403401

@@ -471,7 +469,7 @@ runs in SF mode it assigns each pooled sender its own slot automatically.
471469
|---|---|---|
472470
| `sf_dir` | unset | Group root. Setting it activates SF. |
473471
| `sender_id` | `default` | Per-sender slot name; ASCII letters / digits / `-_` only (no `.` or path separators). |
474-
| `sf_max_bytes` | 4 MiB | Per-segment file size. |
472+
| `sf_max_segment_bytes` | 4 MiB | Per-segment file size. |
475473
| `sf_max_total_bytes` | 10 GiB | Total cap; producer is backpressured when reached. |
476474
| `sf_append_deadline_millis` | 30000 | How long `At` / `AtNow` block on backpressure before failing. |
477475
| `reconnect_max_duration_millis` | 300000 | Bounds only the blocking sync initial connect. A running sender retries transient outages indefinitely; it is also reused as the poison-frame episode budget (`max_frame_rejections`). |
@@ -486,7 +484,7 @@ runs in SF mode it assigns each pooled sender its own slot automatically.
486484
| `durable_ack_keepalive_interval_millis` | 200 | Idle ping that re-elicits pending durable acks; `<= 0` disables (an idle producer can then stall `AwaitAckedFsn`). |
487485

488486
The same options are available programmatically: `WithSfDir`, `WithSenderId`,
489-
`WithSfMaxBytes`, `WithSfMaxTotalBytes`, `WithReconnectPolicy`,
487+
`WithSfMaxSegmentBytes`, `WithSfMaxTotalBytes`, `WithReconnectPolicy`,
490488
`WithInitialConnectRetry`, `WithInitialConnectMode`, `WithCloseFlushTimeout`,
491489
`WithMaxFrameRejections`, `WithRequestDurableAck`,
492490
`WithDurableAckKeepaliveInterval`.

0 commit comments

Comments
 (0)