Commit 9cc550f
Surface startup endpoint-policy failures
endpointPolicyFailureIsTerminal() latched a terminal only for an ORPHAN
drainer, so a FOREGROUND sender retried auth, non-421 upgrade and
durable-ack capability failures forever -- including before it had ever
reached the server. An operator whose credentials are wrong then watched
a mute sender buffer into store-and-forward until it filled and
misreported the cause as "out of space". Two pre-existing tests pin that
startup contract and went red:
QuestDBFacadeCallbacksTest#testFacadeErrorHandlerReceivesAsyncIngestError
asserts the errorHandler receives the async auth terminal, and
QuestDBFacadeDrainerListenerTest asserts close() rethrows the foreground's
latched capability-gap terminal.
Key the terminal off hasEverConnected as well. Connectivity problems are
the caller's problem during startup: SYNC/OFF startup reports them by
throwing from build(); ASYNC has no caller left to throw at, so the
latched terminal reaches the user through SenderErrorHandler and the
close() rethrow. The constructor already seeds hasEverConnected =
client != null, so SYNC/OFF arrives past initialization and never latches,
and swapClient makes the flag sticky: once the wire has been up,
store-and-forward owns the buffered data and every endpoint-policy failure
is a transient to ride out (Invariant B), unchanged. A transport failure
(a dead port) never consulted this predicate and still retries forever.
Rewrite the three tests that asserted the opposite so they pin the
restored contract, and cross-link testAsyncNoServerRetriesForeverNoTerminal
as its transport-half twin.
Reverting the predicate fails both pre-existing tests plus the two
rewritten async-initial ones, while the post-start tests stay green.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>1 parent 0428fd8 commit 9cc550f
3 files changed
Lines changed: 93 additions & 38 deletions
File tree
- core/src
- main/java/io/questdb/client/cutlass/qwp/client/sf/cursor
- test/java/io/questdb/client/test/cutlass/qwp/client
- sf/cursor
Lines changed: 28 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1772 | 1772 | | |
1773 | 1773 | | |
1774 | 1774 | | |
| 1775 | + | |
| 1776 | + | |
| 1777 | + | |
| 1778 | + | |
| 1779 | + | |
| 1780 | + | |
| 1781 | + | |
| 1782 | + | |
| 1783 | + | |
| 1784 | + | |
| 1785 | + | |
| 1786 | + | |
| 1787 | + | |
| 1788 | + | |
| 1789 | + | |
| 1790 | + | |
| 1791 | + | |
| 1792 | + | |
| 1793 | + | |
| 1794 | + | |
| 1795 | + | |
| 1796 | + | |
| 1797 | + | |
1775 | 1798 | | |
1776 | | - | |
| 1799 | + | |
1777 | 1800 | | |
1778 | 1801 | | |
1779 | 1802 | | |
| |||
2287 | 2310 | | |
2288 | 2311 | | |
2289 | 2312 | | |
2290 | | - | |
| 2313 | + | |
| 2314 | + | |
| 2315 | + | |
| 2316 | + | |
2291 | 2317 | | |
2292 | 2318 | | |
2293 | 2319 | | |
| |||
Lines changed: 28 additions & 15 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
58 | 58 | | |
59 | 59 | | |
60 | 60 | | |
61 | | - | |
62 | | - | |
63 | | - | |
64 | | - | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
65 | 76 | | |
66 | 77 | | |
67 | 78 | | |
| |||
79 | 90 | | |
80 | 91 | | |
81 | 92 | | |
82 | | - | |
83 | | - | |
84 | | - | |
85 | | - | |
86 | | - | |
87 | | - | |
88 | | - | |
89 | | - | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
90 | 103 | | |
91 | | - | |
92 | 104 | | |
93 | 105 | | |
94 | 106 | | |
| |||
102 | 114 | | |
103 | 115 | | |
104 | 116 | | |
105 | | - | |
106 | | - | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
107 | 120 | | |
108 | 121 | | |
109 | 122 | | |
| |||
Lines changed: 37 additions & 21 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
55 | 55 | | |
56 | 56 | | |
57 | 57 | | |
58 | | - | |
59 | | - | |
60 | | - | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
61 | 62 | | |
62 | 63 | | |
63 | 64 | | |
64 | | - | |
65 | | - | |
66 | | - | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
67 | 69 | | |
68 | 70 | | |
69 | 71 | | |
| |||
78 | 80 | | |
79 | 81 | | |
80 | 82 | | |
81 | | - | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
82 | 92 | | |
83 | | - | |
| 93 | + | |
| 94 | + | |
84 | 95 | | |
85 | 96 | | |
86 | 97 | | |
| |||
111 | 122 | | |
112 | 123 | | |
113 | 124 | | |
114 | | - | |
115 | | - | |
116 | | - | |
117 | | - | |
118 | | - | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
119 | 131 | | |
120 | | - | |
121 | | - | |
122 | | - | |
123 | | - | |
124 | | - | |
125 | | - | |
126 | | - | |
127 | | - | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
128 | 137 | | |
129 | 138 | | |
130 | 139 | | |
| |||
133 | 142 | | |
134 | 143 | | |
135 | 144 | | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
136 | 152 | | |
137 | 153 | | |
138 | 154 | | |
| |||
0 commit comments