Skip to content

Commit b827c55

Browse files
committed
docs(qwp): remove stale design/ specs; fix budget-exhaustion javadoc residuals (Invariant B)
The design/ directory promised the removed reconnect-budget contract (qwp-cursor-durability.md: 'On budget exhaustion: connection error recorded -> next user-thread API call throws' -- now false under Invariant B) and had drifted from the shipped code in several other places. Remove the directory outright rather than patch it piecemeal. Javadoc residuals fixed in the same sweep: - CursorWebSocketSendLoop constructor: async-initial-connect terminals are auth/upgrade rejects only; plain connect failures retry indefinitely (no wall-clock budget give-up). - CursorWebSocketSendLoop.recordFatal: drop the stale '(or it ran out of budget)' parenthetical -- no I/O-thread caller can exhaust a budget anymore. - CloseDrainTest / PrReviewRedTestsE2e: drop references to the deleted design files; describe the contracts inline instead. The connectWithRetry javadoc keeps its budget-exhaustion mention on purpose: the blocking (sync) initial connect still honors reconnect_max_duration_millis and throws.
1 parent 0e5125f commit b827c55

9 files changed

Lines changed: 9 additions & 1447 deletions

File tree

core/src/main/java/io/questdb/client/cutlass/qwp/client/sf/cursor/CursorWebSocketSendLoop.java

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -273,9 +273,10 @@ public final class CursorWebSocketSendLoop implements QuietCloseable {
273273
* {@code client} may be {@code null} only if {@code reconnectFactory}
274274
* is non-null — this is the async-initial-connect path: the I/O thread
275275
* runs the same retry loop on its first iteration to obtain a live
276-
* client, and a terminal failure (auth/upgrade reject or budget
277-
* exhaustion) is delivered through the dispatcher rather than thrown
278-
* to the constructor's caller.
276+
* client, and a terminal failure (auth/upgrade reject) is delivered
277+
* through the dispatcher rather than thrown to the constructor's
278+
* caller; plain connect failures are retried indefinitely
279+
* (Invariant B: no wall-clock budget give-up).
279280
*/
280281
public CursorWebSocketSendLoop(WebSocketClient client, CursorSendEngine engine,
281282
long fsnAtZero, long parkNanos,
@@ -1366,7 +1367,7 @@ private void positionCursorInSegment(MmapSegment seg, long targetFsn) {
13661367

13671368
/**
13681369
* Mark the loop as fatally failed. Caller has decided no reconnect
1369-
* is possible (or it ran out of budget) — latch the error so
1370+
* is possible — latch the error so
13701371
* {@link #checkError} can surface it to the producer thread, then
13711372
* stop the loop. First-writer-wins: only the first failure latches.
13721373
* The check-then-latch is unsynchronized and is safe ONLY because

core/src/test/java/io/questdb/client/test/cutlass/qwp/client/CloseDrainTest.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,7 @@
3838
import java.util.concurrent.atomic.AtomicLong;
3939

4040
/**
41-
* Regression tests for the close() drain semantics specified in
42-
* design/qwp-cursor-durability.md.
41+
* Regression tests for the close() drain semantics.
4342
* <p>
4443
* Without {@code close_flush_timeout_millis}, close() returned as soon as
4544
* the cursor I/O loop's {@code running} flag flipped — meaning frames

core/src/test/java/io/questdb/client/test/cutlass/qwp/client/PrReviewRedTestsE2e.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -60,9 +60,9 @@ public class PrReviewRedTestsE2e {
6060
* <li>{@code fail()} auth-terminal branch (lines 437-438)</li>
6161
* <li>{@code fail()} budget-exhausted branch (lines 484-485)</li>
6262
* </ul>
63-
* The locked spec ({@code design/qwp-cursor-error-api.md} § "Path 2:
64-
* producer-side typed throw") requires {@code signal.terminalError = err}
65-
* to be written BEFORE {@code errorInbox.offer(err)}.
63+
* The error-API contract ("Path 2: producer-side typed throw") requires
64+
* {@code signal.terminalError = err} to be written BEFORE
65+
* {@code errorInbox.offer(err)}.
6666
* <p>
6767
* Concrete consequence the spec calls out: a user-supplied error handler
6868
* that synchronously calls {@code sender.flush()} from inside

design/qwp-client-ergonomics-issues.md

Lines changed: 0 additions & 219 deletions
This file was deleted.

0 commit comments

Comments
 (0)