From 3eb07ea985d6474674e297028523273f3a9c4b0e Mon Sep 17 00:00:00 2001 From: Maurus Decimus <11444311+mdecimus@users.noreply.github.com> Date: Mon, 21 Sep 2026 09:34:14 +0200 Subject: [PATCH] Redis fixes --- CHANGELOG.md | 3 + crates/store/src/backend/redis/lookup.rs | 236 +++++++++++------------ 2 files changed, 116 insertions(+), 123 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1a99b8e88..0d800f125 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -30,6 +30,9 @@ If you are upgrading from v0.16.x, replace the binary (or run `docker pull`). If - OIDC: Bearer tokens that carry no `email`, `preferred_username` or `upn` claim are always authenticated against the default directory. - WebUI: A failed update no longer takes an `Application` offline. - FoundationDB: The cached read version is invalidated when any broadcast is received from another node. +- Redis: + - On a cluster, the rate limiter and the blob upload quota issue `INCR` and `EXPIRE` as a `MULTI`/`EXEC` transaction, whose `MOVED` redirects collapse into a single `EXECABORT` that never refreshes the slot map. + - A connection that fails because it is addressing the wrong server is returned to the pool and reused, since the recycle check only issues `PING`. ## [0.16.22] - 2026-09-13 diff --git a/crates/store/src/backend/redis/lookup.rs b/crates/store/src/backend/redis/lookup.rs index 9f681d958..300624ba7 100644 --- a/crates/store/src/backend/redis/lookup.rs +++ b/crates/store/src/backend/redis/lookup.rs @@ -6,36 +6,37 @@ use super::{RedisPool, RedisStore, into_error}; use crate::{Deserialize, write::now}; -use redis::AsyncCommands; +use deadpool::managed::{Manager, Object, Pool}; +use redis::{AsyncCommands, RedisError, RedisResult, RetryMethod, Script}; +use std::sync::LazyLock; + +static INCR_EXPIRE: LazyLock