feat(labrinth): Redis Cluster (#6771)

* chore(labrinth): bump to redis 1.4.1

* feat(labrinth): redis cluster

* chore: cleanup

* feat(labrinth): cache locking

* fix(labrinth): clippy

* chore(labrinth): cleanup env, remove postcard support

* chore(ci): fix test env for labrinth

* chore(labrinth): bump all key versions

* chore(labrinth): improve redis key identities handling

* chore(labrinth): simplify deadline handling

* chore(labrinth): remove unused lease tracking

* chore(labrinth): remove distributed cache locking for now

* chore(labrinth): improve redis backend init error

* feat(labrinth): expose redis read replica strategy

* chore(ci): remove other connection mode tests

* chore: split xredis crate

* feat(xredis): primaries routing

* chore: tombi fmt

* chore: clippy

* chore: update query cache
This commit is contained in:
François-Xavier Talbot
2026-07-23 11:35:02 +02:00
committed by GitHub
parent 11af2651ef
commit b4d681e713
146 changed files with 4741 additions and 2000 deletions
+7 -3
View File
@@ -1,5 +1,4 @@
use crate::database::PgPool;
use crate::database::redis::RedisPool;
use crate::database::{MIGRATOR, ReadOnlyPgPool};
use crate::env::ENV;
use crate::search::{self, SearchBackend};
@@ -7,6 +6,7 @@ use sqlx::postgres::PgPoolOptions;
use std::sync::Arc;
use std::time::Duration;
use url::Url;
use xredis::RedisPool;
use crate::test::{dummy_data, environment::TestEnvironment};
@@ -90,7 +90,8 @@ impl TemporaryDatabase {
println!("Migrations complete");
// Gets new Redis pool
let redis_pool = RedisPool::new(temp_database_name.clone());
let redis_pool =
crate::database::redis::from_env(temp_database_name.clone()).await;
// Create search backend
let search_backend = search::backend(Some(temp_database_name.clone()));
@@ -192,7 +193,10 @@ impl TemporaryDatabase {
pool: pool.clone(),
ro_pool: ReadOnlyPgPool::from(pool.clone()),
database_name: TEMPLATE_DATABASE_NAME.to_string(),
redis_pool: RedisPool::new(name.clone()),
redis_pool: crate::database::redis::from_env(
name.clone(),
)
.await,
search_backend: Arc::from(search::backend(Some(
name.clone(),
))),