From 0931599305ccf9ec325339d7d709679d7003d7e8 Mon Sep 17 00:00:00 2001 From: ABCxFF <79597906+abcxff@users.noreply.github.com> Date: Thu, 23 Jul 2026 18:10:43 +0000 Subject: [PATCH 1/2] fix(rivetkit): route all actor sqlite through envoy when local sqlite is not compiled --- .../packages/rivetkit/src/registry.rs | 30 ++++++++++++++----- 1 file changed, 22 insertions(+), 8 deletions(-) diff --git a/rivetkit-rust/packages/rivetkit/src/registry.rs b/rivetkit-rust/packages/rivetkit/src/registry.rs index a9d9421715..8159a17aad 100644 --- a/rivetkit-rust/packages/rivetkit/src/registry.rs +++ b/rivetkit-rust/packages/rivetkit/src/registry.rs @@ -213,7 +213,9 @@ where fn actor_config(mut config: ActorConfig) -> ActorConfig { config.has_database |= A::HAS_DATABASE; - if A::HAS_DATABASE && !cfg!(feature = "sqlite-local") { + // Internal storage (state, KV, queue) always uses SQLite, so without local + // SQLite compiled in every actor must route it through the engine. + if !cfg!(feature = "sqlite-local") { config.remote_sqlite = true; } config @@ -297,12 +299,24 @@ mod tests { #[test] fn actor_database_declaration_enables_core_database_config() { - let config = actor_config::(ActorConfig::default()); - assert!(config.has_database); - assert!(config.remote_sqlite); - - let config = actor_config::(ActorConfig::default()); - assert!(!config.has_database); - assert!(!config.remote_sqlite); + let db = actor_config::(ActorConfig::default()); + assert!(db.has_database); + + let empty = actor_config::(ActorConfig::default()); + assert!(!empty.has_database); + + // Internal storage always uses SQLite, so without local SQLite compiled + // in every actor routes SQLite through the engine regardless of whether + // it declares a user database. + #[cfg(not(feature = "sqlite-local"))] + { + assert!(db.remote_sqlite); + assert!(empty.remote_sqlite); + } + #[cfg(feature = "sqlite-local")] + { + assert!(!db.remote_sqlite); + assert!(!empty.remote_sqlite); + } } } From 6479a185c69a3a2c0225a9541fa453910e4fab47 Mon Sep 17 00:00:00 2001 From: ABCxFF <79597906+abcxff@users.noreply.github.com> Date: Thu, 23 Jul 2026 19:45:54 +0000 Subject: [PATCH 2/2] docs(deploy): document --drain-on-version-upgrade false for container-runner --- website/src/content/docs/deploy/container-runner.mdx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/website/src/content/docs/deploy/container-runner.mdx b/website/src/content/docs/deploy/container-runner.mdx index 4fc10ca15c..239afd17f5 100644 --- a/website/src/content/docs/deploy/container-runner.mdx +++ b/website/src/content/docs/deploy/container-runner.mdx @@ -41,12 +41,13 @@ Artifacts are published for `x86_64-unknown-linux-musl` and `aarch64-unknown-lin -Deploy the image to [Rivet Compute](/docs/deploy/rivet-compute) with the CLI. For game servers, configure the pool with one actor per instance: +Deploy the image to [Rivet Compute](/docs/deploy/rivet-compute) with the CLI. For game servers, configure the pool with one actor per instance and keep running instances alive across version upgrades: ```bash npx @rivetkit/cli deploy \ --token "$RIVET_CLOUD_TOKEN" \ --instance-request-concurrency 1 \ + --drain-on-version-upgrade false \ --dockerfile Dockerfile ```