Go to file
Michael Netshipise 7ebde11aae fix(lock): never cancel an in-flight re-acquire; unlock joins the hold task
A released lock could come back as a ghost. `Lock::unlock` signalled the
background hold task and sent UnLock immediately; if the task had an
idempotent re-acquire RPC in flight, `race_stop` dropped the future
client-side but the server kept processing it — once UnLock had removed
the original lease, the same request_id re-WON the key with a fresh id
that no client held. On graylin prod that ghost writer sat on
`shutdown:pod:<id>:barrier` (created ~1 ms after "released :barrier
writer", then "lease_ttl pq has a removed node" and never reaped) and
parked every proxied request on the pod for the full 120 s restart wait.

- hold_loop no longer races the acquire RPC against stop; it lets the
  RPC finish (bounded by HOLD_RPC_TIMEOUT), then honours a level
  `stopped` flag and releases any lease it won while stopping.
- unlock() sets `stopped`, notifies, JOINS the hold task (abort only as
  a backstop past every bound), then UnLocks the *current* id.
- Drop sets the flag and notifies but no longer aborts mid-RPC.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01MCwe5Sf5NU8Ei13oqTcesj
2026-09-24 23:45:56 +02:00
go waymaker-client v0.1.27 — polyglot Go / TypeScript / Rust clients 2026-06-09 19:20:48 +02:00
proto hll: hll_multi_add — batch many (name,items) into one RPC 2026-06-20 09:30:21 +02:00
rust fix(lock): never cancel an in-flight re-acquire; unlock joins the hold task 2026-09-24 23:45:56 +02:00
scripts waymaker-client v0.1.27 — polyglot Go / TypeScript / Rust clients 2026-06-09 19:20:48 +02:00
ts fix(lock): never cancel an in-flight re-acquire; unlock joins the hold task 2026-09-24 23:45:56 +02:00
.gitignore waymaker-client v0.1.27 — polyglot Go / TypeScript / Rust clients 2026-06-09 19:20:48 +02:00
Cargo.toml waymaker-client v0.1.27 — polyglot Go / TypeScript / Rust clients 2026-06-09 19:20:48 +02:00
README.md waymaker-client v0.1.27 — polyglot Go / TypeScript / Rust clients 2026-06-09 19:20:48 +02:00
VERSION fix(lock): never cancel an in-flight re-acquire; unlock joins the hold task 2026-09-24 23:45:56 +02:00

README.md

waymaker-client

Official client libraries for waymaker — the distributed coordination service (locks, streams, KV, collections, sketches, cache, object store) over gRPC.

Three clients, one wire contract, versioned in lockstep with the waymaker server:

Language Path Package
Rust rust/ waymaker-client (crate)
Go go/ git.awesomike.com/pub/waymaker-client/go (module)
TypeScript ts/ @waymaker/client (npm)

The .proto files in proto/ are vendored copies; the waymaker server repo is the source of truth. scripts/sync-protos.sh refreshes them and keeps VERSION aligned with the server.

Versioning

Every release is tagged at the same version as the waymaker server it targets (see VERSION). A client tagged v0.1.27 speaks the wire contract of waymaker v0.1.27. The gRPC wire format is backward-compatible across patch releases (enum integer values are stable), so a client one patch behind a server generally interoperates — but match versions for new surface.

Layout

proto/      vendored .proto (source of truth: waymaker repo)
rust/       Rust client crate (hand-written ergonomic wrappers + generated stubs)
go/         Go client module
ts/         TypeScript client (npm)
scripts/    sync-protos.sh + codegen scripts (gen-go/gen-ts)
VERSION     lockstep version with the waymaker server

Regenerating

# refresh protos from a local waymaker checkout, then regenerate all stubs
WAYMAKER_REPO=../waymaker ./scripts/sync-protos.sh
./scripts/gen-go.sh
./scripts/gen-ts.sh
# Rust regenerates from proto/ automatically via build.rs on `cargo build`.

Quickstart