From 3d447506f562e754dc33e9acaf77a6d814930e41 Mon Sep 17 00:00:00 2001 From: Ramon Smits Date: Fri, 28 Aug 2026 12:18:50 +0200 Subject: [PATCH] =?UTF-8?q?=E2=9C=A8=20Disable=20RavenDB=20storage=20prefe?= =?UTF-8?q?tching=20by=20default?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Storage.EnablePrefetching is a server-wide-only RavenDB setting that defaults to true. ServiceControl now disables it by default: - Embedded mode (Primary and Audit): --Storage.EnablePrefetching=false is passed via ServerOptions.CommandLineArgs - Container image (servicecontrol-ravendb): RAVEN_Storage_EnablePrefetching=false is set as an image ENV, which users can still override --- src/ServiceControl.RavenDB/Dockerfile | 3 ++- src/ServiceControl.RavenDB/EmbeddedDatabase.cs | 3 +++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/ServiceControl.RavenDB/Dockerfile b/src/ServiceControl.RavenDB/Dockerfile index 2d11600e2e..db21a900d5 100644 --- a/src/ServiceControl.RavenDB/Dockerfile +++ b/src/ServiceControl.RavenDB/Dockerfile @@ -11,7 +11,8 @@ USER ravendb ENV RAVEN_License_Eula_Accepted=true \ RAVEN_License_Path=/usr/lib/ravendb/servicecontrol-license.json \ - RAVEN_Setup_Mode=None + RAVEN_Setup_Mode=None \ + RAVEN_Storage_EnablePrefetching=false LABEL org.opencontainers.image.source=https://github.com/Particular/ServiceControl \ org.opencontainers.image.authors="Particular Software" \ diff --git a/src/ServiceControl.RavenDB/EmbeddedDatabase.cs b/src/ServiceControl.RavenDB/EmbeddedDatabase.cs index 8bdc0245ab..efdf66b06f 100644 --- a/src/ServiceControl.RavenDB/EmbeddedDatabase.cs +++ b/src/ServiceControl.RavenDB/EmbeddedDatabase.cs @@ -83,6 +83,9 @@ public static EmbeddedDatabase Start(EmbeddedDatabaseConfiguration databaseConfi // HINT: If this is not set, then Raven will pick a default location relative to the server binaries // See https://github.com/ravendb/ravendb/issues/15694 $"--Indexing.NuGetPackagesPath=\"{nugetPackagesPath}\"", + // HINT: Storage.EnablePrefetching is server-wide only and defaults to true in RavenDB. ServiceControl + // disables it by default. Set RAVEN_Storage_EnablePrefetching on the container image to change it there. + "--Storage.EnablePrefetching=false", ..optionalArgs ], DataDirectory = databaseConfiguration.DbPath,