Skip to content

perf(client): allow concurrent response cache lookups - #1545

Draft
nuzzles wants to merge 1 commit into
modelcontextprotocol:mainfrom
nuzzles:simbleau/cache-shared-lookups
Draft

nuzzles wants to merge 1 commit into
modelcontextprotocol:mainfrom
nuzzles:simbleau/cache-shared-lookups

Conversation

@nuzzles

@nuzzles nuzzles commented Dec 1, 2026

Copy link
Copy Markdown
Member

Let client response-cache lookups share a read lock. When a lookup needs to remove an expired entry, acquire the write lock and repeat the lookup so a concurrent replacement or change to the active partition is respected.

A regression test holds a read guard while checking a fresh hit and a miss. It fails with the original exclusive lookup. Formatting, Clippy, and all 417 library and Streamable HTTP client concurrency tests passed locally.

@github-actions github-actions Bot added T-core Core library changes T-service Service layer changes labels Dec 1, 2026
@github-actions
github-actions Bot requested a review from connor4312 December 1, 2026 21:03
@github-actions

github-actions Bot commented Dec 1, 2026

Copy link
Copy Markdown
Contributor

@connor4312 is on triage rotation this week and is the reviewer for this one.

Labels come from the PR labeler. Please review the change.

Automated triage. Labels are a first pass and the assigned maintainer has the final say.

This branch has not been deployed

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

Labels

T-core Core library changes T-service Service layer changes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant