Skip to content

Conversation

@bkirwi
Copy link
Contributor

@bkirwi bkirwi commented Dec 19, 2025

Motivation

Tips for reviewer

Checklist

  • This PR has adequate test coverage / QA involvement has been duly considered. (trigger-ci for additional test/nightly runs)
  • This PR has an associated up-to-date design doc, is a design doc (template), or is sufficiently small to not require a design.
  • If this PR evolves an existing $T ⇔ Proto$T mapping (possibly in a backwards-incompatible way), then it is tagged with a T-proto label.
  • If this PR will require changes to cloud orchestration or tests, there is a companion cloud PR to account for those changes that is tagged with the release-blocker label (example).
  • If this PR includes major user-facing behavior changes, I have pinged the relevant PM to schedule a changelog post.

@bkirwi bkirwi force-pushed the task-lease branch 4 times, most recently from d73f2b3 to bfa3eba Compare January 2, 2026 20:33
bkirwi added 3 commits January 2, 2026 19:26
This is somewhere between Tokio's `watch` and a normal mutex with a
condvar. Kind of annoying to have to write one's own library for this,
but everything else I tried was either awkward or needed an unbounded
channel...
These two are much more tightly related than the task is to the read
handle, and this allows for some additional privacy for shared state.
Observe new seqnos in both the handle and the heartbeat thread

Always downgrade to the shared seqno

Should be pretty recent!

Use the main downgrade-since method in the background thread

Do all downgrades in the background task

Shift expiry to the background task

Move the heartbeat task to read.rs

This is a bit more read-handle business than machine business, in my
opinion!

Comment fixup
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant