Description
Replace DashMap in the message buffer with Scalable Concurrent Containers (SCC) HashMap. The goal is to improve async safety and maintainability while keeping current buffer behavior unchanged.
Motivation
DashMap has known deadlock risks in async contexts and requires careful usage patterns that are easy to regress. SCC offers APIs better aligned with async Rust and safer mutation semantics for this hot path.
Current State
The message buffer currently uses DashMap for concurrent in-memory storage and mutation. It works, but safety depends on strict guard-handling discipline, which makes future changes riskier.
Proposed Changes
- Use SCC HashMap as the message buffer’s hot-tier concurrent map.
- Update mutation and maintenance flows to SCC-native async-safe patterns.
- Preserve message lifecycle semantics (restore, mutate, flush marking, safe eviction).
- Update dependencies and tests to support the migration without external behavior changes.
Expected Benefits
- Lower deadlock and async concurrency risk.
- Better maintainability with explicit, async-friendly APIs.
- More confidence in behavior under high concurrency.
- Lower long-term dependency risk.
References
Description
Replace DashMap in the message buffer with Scalable Concurrent Containers (SCC) HashMap. The goal is to improve async safety and maintainability while keeping current buffer behavior unchanged.
Motivation
DashMap has known deadlock risks in async contexts and requires careful usage patterns that are easy to regress. SCC offers APIs better aligned with async Rust and safer mutation semantics for this hot path.
Current State
The message buffer currently uses DashMap for concurrent in-memory storage and mutation. It works, but safety depends on strict guard-handling discipline, which makes future changes riskier.
Proposed Changes
Expected Benefits
References