Repository navigation
refactor(memory): use parking_lot for the live-session map in session_limit - #2462
Merged
cyberlife-coder merged 3 commits intoOct 24, 2026
Merged
Conversation
…_limit The HTTP session limiter's live-session map was the crate's one remaining std::sync::Mutex. parking_lot does not poison, so the poison-recovery shim (PoisonError::into_inner) goes away, per the workspace lock policy; behavior is unchanged. No guard is held across an await point (clippy await_holding_lock is clean). The comment on the parking_lot dependency in Cargo.toml named only WORKING_INDEX_WRITE; it now names the session limiter too. CHANGELOG note under Changed.
Up to standards ✅🟢 Issues
|
| Metric | Results |
|---|---|
| Complexity | 0 |
NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.
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.
Description
Supersedes #2452, which cannot merge as it stands (non-conforming branch prefix and commit author). The original change is kept as is; #2452 stays open for its owner to close.
The HTTP session limiter's live-session map (
crates/velesdb-memory/src/http/session_limit.rs) was the crate's one remainingstd::sync::Mutex. It now usesparking_lot::Mutex, which does not poison, so the poison-recovery shim (PoisonError::into_inner) is gone, per the workspace lock policy (AGENTS.md). Behavior is unchanged. No guard is held across an.await(clippy::await_holding_lockis clean). CHANGELOG note under### Changedincrates/velesdb-memory/CHANGELOG.md.Addition on top of #2452: the comment above the
parking_lotdependency incrates/velesdb-memory/Cargo.tomlnamed onlyWORKING_INDEX_WRITE; it now also names the session limiter's live-session map.Type of Change
How Has This Been Tested?
Unit tests
Integration tests
cargo test -p velesdb-memory --no-default-features --features http --lib session_limit -- --test-threads=1: 24 passed.cargo test -p velesdb-memory --features http --test http_transport --test http_lock_contention: 16 + 1 passed.cargo clippy -p velesdb-memory --all-targets -- -D warnings -D clippy::pedantic -D clippy::await_holding_lock, with--features httpand with default features: clean.cargo fmt -p velesdb-memory -- --check: clean.scripts/check-doc-contract.sh, the fivecheck-doc-freshness.pyguards (strict),check-version-sync.py,check-mcp-doc-contract.py,check-promise-contract.py,check-feature-claims.pyandcheck-ai-attribution.py origin/develop..HEAD: all pass.Test Configuration:
Checklist