Commit a8fea31
committed
test(qwp): red-first - orphan drainer must not quarantine a down server (Invariant B)
BackgroundDrainer.connectWithDurableAckRetry() routes any non-role, non-durable
-ack Throwable -- including "all endpoints unreachable" (server down / network
partition) -- to an IMMEDIATE markFailed / .failed sentinel on the FIRST sweep.
That quarantines an orphan slot's un-drained SF data on a transient outage,
requiring manual operator recovery, and is asymmetric with the live sender's
background loop (CursorWebSocketSendLoop.connectLoop), which backs off and
retries a transport error indefinitely.
Invariant B: a down/unreachable cluster is transient (the server will come
back). The orphan drainer must behave exactly like the live background loop --
retry with capped backoff until a primary is reachable, stopRequested, or SF
exhaustion; only genuine terminals (auth / non-421 upgrade / durable-ack
capability gap) fail fast.
Add testTransportErrorNeverQuarantinesInvariantB: alwaysFailing factory throwing
LineSenderException("all endpoints unreachable"), observed past a short budget;
asserts still retrying (PENDING, no sentinel, attempts past the first sweep). Red
now (attempts=1, outcome=FAILED); green once transport errors are retried like
connectLoop.1 parent fe0148a commit a8fea31
1 file changed
Lines changed: 61 additions & 0 deletions
File tree
- core/src/test/java/io/questdb/client/test/cutlass/qwp/client/sf/cursor
Lines changed: 61 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
| 30 | + | |
30 | 31 | | |
31 | 32 | | |
32 | 33 | | |
| |||
397 | 398 | | |
398 | 399 | | |
399 | 400 | | |
| 401 | + | |
| 402 | + | |
| 403 | + | |
| 404 | + | |
| 405 | + | |
| 406 | + | |
| 407 | + | |
| 408 | + | |
| 409 | + | |
| 410 | + | |
| 411 | + | |
| 412 | + | |
| 413 | + | |
| 414 | + | |
| 415 | + | |
| 416 | + | |
| 417 | + | |
| 418 | + | |
| 419 | + | |
| 420 | + | |
| 421 | + | |
| 422 | + | |
| 423 | + | |
| 424 | + | |
| 425 | + | |
| 426 | + | |
| 427 | + | |
| 428 | + | |
| 429 | + | |
| 430 | + | |
| 431 | + | |
| 432 | + | |
| 433 | + | |
| 434 | + | |
| 435 | + | |
| 436 | + | |
| 437 | + | |
| 438 | + | |
| 439 | + | |
| 440 | + | |
| 441 | + | |
| 442 | + | |
| 443 | + | |
| 444 | + | |
| 445 | + | |
| 446 | + | |
| 447 | + | |
| 448 | + | |
| 449 | + | |
| 450 | + | |
| 451 | + | |
| 452 | + | |
| 453 | + | |
| 454 | + | |
| 455 | + | |
| 456 | + | |
| 457 | + | |
| 458 | + | |
| 459 | + | |
| 460 | + | |
400 | 461 | | |
401 | 462 | | |
402 | 463 | | |
| |||
0 commit comments