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

prisma-risk / tsoracle / 35763332338
97%

Build:
DEFAULT BRANCH: main
Ran 22 Sep 2026 05:58PM UTC
Jobs 1
Files 97
Run time 1min
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

22 Sep 2026 05:51PM UTC coverage: 96.623% (+0.08%) from 96.543%
35763332338

push

github

web-flow
fix(client): refresh the cached leader after a successful lease RPC (#717)

The leader cache stays fresh for leader_ttl after its last refresh, and only the GetTs and GetSeq success paths refreshed it. control_plane_rpc seated a NOT_LEADER hint but ignored its own successes. A caller that only issues lease RPCs therefore kept a seated hint for exactly leader_ttl, however many renewals succeeded against it. The next call fell back to the first configured endpoint. When that endpoint is a follower, or a load-balanced address whose connection is pinned to one, the call was refused again: one failed control-plane call every leader_ttl, forever.

The map closure of each control-plane RPC now returns a ControlPlaneReply: the decoded output plus the epoch at which the reply proves the endpoint led, if it proves that at all. On success control_plane_rpc passes that epoch to ChannelPool::record_success, so the refresh follows the same monotone-forward rule as GetTs. AcquireLease and RenewLease are leader-only and carry an epoch, so they refresh. GetSafeFrontier and GetCurrentMaxSafe do not: followers answer them with a zero value and Epoch::ZERO, which a single-node leader also uses, so a success says nothing about leadership. ReleaseLease does not either: it is leader-only but its reply has no epoch, and an epoch-less confirmed success on an empty cache would seat an entry that a later success from the real leader could not displace.

Tests: lease_successes_keep_the_redirected_leader_cached_past_leader_ttl boots a follower and a leader, points a client with a 300 ms leader_ttl at the follower, follows the redirect, and renews every 75 ms for three TTLs. Without the fix renewal 3 is refused by the follower at about 310 ms. Unit tests cover a renewal seating the serving endpoint at its epoch, a late renewal at a lower epoch not unseating a fresher leader, and release, safe-frontier and max-safe successes leaving the cache untouched. The client usage doc now lis... (continued)

145 of 151 new or added lines in 2 files covered. (96.03%)

1 existing line in 1 file now uncovered.

19168 of 19838 relevant lines covered (96.62%)

259682.96 hits per line

Uncovered Changes

Lines Coverage ∆ File
6
84.21
5.95% crates/tsoracle-client/src/test_support.rs

Coverage Regressions

Lines Coverage ∆ File
1
95.29
-0.06% crates/tsoracle-client/src/retry.rs
Jobs
ID Job ID Ran Files Coverage
1 35763332338.1 22 Sep 2026 05:58PM UTC 97
96.62
GitHub Action Run
Source Files on build 35763332338
  • Tree
  • List 97
  • Changed 3
  • Source Changed 2
  • Coverage Changed 3
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #35763332338
  • a14e8906 on github
  • Prev Build on main (#35300513285)
  • Next Build on main (#35763614425)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc