Repository navigation
perf(valkey): the caches of a process share one Valkey cache tier - #2604
Merged
Merged
Conversation
The embeddings engine, the Radar client and the library store of `devops ai ingest` use one `ValkeyCacheTier` for each process, `shared_cache_tier()`. So they share one client, one pool and one circuit breaker, and an outage costs one connection attempt in each cooldown for the process. The tier waits at most 0.25 s for a connection (`DEFAULT_VALKEY_CACHE_CONNECT_TIMEOUT_SECONDS`, never more than `valkey.timeout`). A tier that cannot be built gives one warning, and the caches run without Valkey. `LibraryVectorStore` takes the tier. `devops ai ingest` no longer imports the private client of the `devops valkey` command or pings it.
Owner
Author
|
Test evidence:
Measured on origin/main Pending a person: review the diff in tuicr ( |
dan-petty
marked this pull request as ready for review
October 29, 2026 02:53
dan-petty
pushed a commit
that referenced
this pull request
Oct 29, 2026
🤖 I have created a release *beep* *boop* --- ## [0.13.2](v0.13.1...v0.13.2) (2026-10-29) ### Performance Improvements * **valkey:** the caches of a process share one Valkey cache tier ([#2604](#2604)) ([c778cde](c778cde)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). Co-authored-by: dan-petty-release[bot] <346998822+dan-petty-release[bot]@users.noreply.github.com>
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.
The embeddings engine, the Radar client and the library store of
devops ai ingestnow use oneValkeyCacheTierfor each process,shared_cache_tier(). They share one client, one pool and one circuit breaker, so while Valkey is down the process makes one connection attempt in each cooldown, not one for each cache.DEFAULT_VALKEY_CACHE_CONNECT_TIMEOUT_SECONDS(0.25 s), never more thanvalkey.timeout, for a connection (valkey-py'ssocket_connect_timeout). A silent host costs 0.25 s, not 2.0 s for each cache.valkey.urlthat is not valid, gives one warning, and the caches run without Valkey.LibraryVectorStoretakes the tier.devops ai ingestno longer imports the private client ofdevops valkeyor pings it.except Exceptionsites go, so three swallowed-failure ceilings fall by one.Closes #1992
Change:
openspec/changes/archive/2026-10-29-1992-shared-valkey-cache-tier/