• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

prisma-risk / tsoracle / 26343988074 / 1
97%
main: 97%

Build:
DEFAULT BRANCH: main
Ran 23 May 2026 09:31PM UTC
Files 74
Run time 2s
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

23 May 2026 09:27PM UTC coverage: 94.729% (-0.02%) from 94.75%
26343988074.1

push

github

web-flow
fix(server): recover from transient consensus errors during the fence (#227)

The failover fence (`run_leader_watch`) propagated every `ConsensusError`
from `load_high_water`/`persist_high_water` via `?`, terminating the
leader-watch task. Because `serve_with_*` stops the server when that task
ends, a single recoverable error during the volatile post-election window
tore the whole tso server down -- and since the node stays raft-leader, no
survivor could serve either. Standalone deployments recover by process
restart, but embedded users (e.g. the openraft-piggyback example) have no
restart, so a momentary quorum blip or a leadership flap permanently
disabled serving. This surfaced as the intermittent "new leader's
serving-state stream closed before reaching Serving" failure in the
piggyback smoke test.

`ConsensusError` already classifies errors as recoverable
(`NotLeader`/`Fenced`/`TransientDriver`) vs permanent (`PermanentDriver`).
Honor that split in the Leader branch instead of failing fast on all:

  * TransientDriver -- retry the fence with bounded exponential backoff;
    the node is still the elected leader and no fresh leadership event is
    coming to re-drive it. An exhausted budget steps down to NotServing and
    awaits the next event rather than tearing the server down.
  * NotLeader / Fenced -- leadership moved under us; step down to NotServing
    and continue the watch loop so the stream delivers the next state.
  * PermanentDriver / allocator-invariant -- still fatal: propagate so
    into_router poisons serving state and stops serving.

Serving stays NotServing until a fence attempt fully succeeds, so the
"never publish Serving at a stale epoch" invariant the poisoning path
protects holds on every path.

Adds a FaultyDriver test fake plus deterministic regression tests for the
transient-retry and NotLeader-step-down paths, a guard that permanent
errors stay fatal, and rewrites the failpoint test that previously pinned
the fail-stop ... (continued)

10208 of 10776 relevant lines covered (94.73%)

1458764.13 hits per line

Source Files on job 26343988074.1
  • Tree
  • List 74
  • Changed 6
  • Source Changed 2
  • Coverage Changed 6
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Build 26343988074
  • eab36488 on github
  • Prev Job for on main (#26343934198.1)
  • Next Job for on main (#26344751859.1)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc