feat: implement core/aggsigdb#430
Conversation
- Use Actor model - Implement `store` - Test `store`
- Use Mutex/Notify pattern - Remove need for handles - Adjust tests and docs
- Use existing Deadliner API (Arc) - Add tests
- Match Charon
- Rust specific
- Matches Charon API
|
Claude finished @emlautarom1's task in 3m 32s —— View job Claude PR Review —
|
| Severity | Item |
|---|---|
| 🟠 | wait_for has no cancellation/timeout primitive — confirm intent |
| 🟠 | Deadliner::c() == None silently disables eviction — log or expect |
| 🟡 | tokio::sync::Mutex unnecessary; std::sync::Mutex is sufficient |
| 🟡 | Drop keysByDuty index makes eviction O(n) vs Charon's O(k) |
| 🟡 | notify_waiters fires even on no-op stores |
| 🟡 | deadliner.add before lock — re-confirm the eviction race comment |
| 🔵 | Doc/ergonomic nits, Cargo.lock churn separability |
Nothing here is a blocker; the implementation is correct and matches Charon V2 semantics. Most actionable is the keysByDuty index (Charon left it in for a reason) and the Deadliner::c() == None warn/expect. The wait_for cancellation question is worth nailing down before downstream consumers pin against this API.
· Branch: emlautarom1/core-aggsigdb
Closes #169
There are two implementations in Charon: V1 uses an Actor model with commands and queries, and V2 uses a Mutex alongside Go runtime trickery. The implementation in use in Charon is V1 due to concurrency issues in V2.
This implementation is closer to V2, and we use tokio's tools (ex.
Notify) to replicate the Go runtime features.Tests have been ported when appropriate, and some new ones were added to increase coverage.