feat(state): add coordinator in-memory shared KV store with TTL and delete#1457
Open
Bhanudahiyaa wants to merge 2 commits intodora-rs:mainfrom
Open
feat(state): add coordinator in-memory shared KV store with TTL and delete#1457Bhanudahiyaa wants to merge 2 commits intodora-rs:mainfrom
Bhanudahiyaa wants to merge 2 commits intodora-rs:mainfrom
Conversation
Contributor
Author
|
Hi @phil-opp , quick question on the failing Ubuntu CLI test. From the logs, it looks like the failure might be coming from the error propagation example (the simulated failure path), rather than the shared state changes introduced here. Since this PR only touches coordinator state + RPC handling, I wanted to confirm:
Happy to dig deeper, just wanted to check before chasing the wrong direction. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #1456
Problem
Project #3 needs a first usable shared-state backend. Contract-only/no-op handling is not enough to exercise real multi-daemon state flows.
Why this matters
This PR introduces a concrete coordinator-side backend with minimal scope:
What changed
1) New coordinator shared-state store
SharedStateStoreinbinaries/coordinator/src/shared_state.rs(namespace, key)get(namespace, key)set(namespace, key, value, ttl_ms)delete(namespace, key)2) TTL semantics
state_setsupports optionalttl_msNone=> non-expiring keyttl_ms == 0is rejected3) RPC contract updates (
libraries/message)StateGetRequestStateSetRequest(includesttl_ms)StateDeleteRequestCoordinatorNotifyservice with:state_getstate_setstate_delete4) Coordinator wiring
shared_statefield toCoordinatorStateCoordinatorNotifyServer:5) Integration-style RPC test
binaries/coordinator/src/listener.rs:Design notes / tradeoffs
Validation
cargo fmt --allcargo test -p dora-coordinator listener::tests -- --nocapturecargo test -p dora-coordinator state_set_get_delete_and_ttl_over_rpc -- --nocapturecargo build -p dora-daemoncargo clippy -p dora-coordinator --all-targets(Existing unrelated workspace warnings remain unchanged.)
———