Skip to content

Commit dedfbc3

Browse files
authored
Disable RavenDB storage prefetching by default (#5832)
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
1 parent e56d5b1 commit dedfbc3

2 files changed

Lines changed: 5 additions & 1 deletion

File tree

‎src/ServiceControl.RavenDB/Dockerfile‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,8 @@ USER ravendb
1111

1212
ENV RAVEN_License_Eula_Accepted=true \
1313
RAVEN_License_Path=/usr/lib/ravendb/servicecontrol-license.json \
14-
RAVEN_Setup_Mode=None
14+
RAVEN_Setup_Mode=None \
15+
RAVEN_Storage_EnablePrefetching=false
1516

1617
LABEL org.opencontainers.image.source=https://github.com/Particular/ServiceControl \
1718
org.opencontainers.image.authors="Particular Software" \

‎src/ServiceControl.RavenDB/EmbeddedDatabase.cs‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,9 @@ public static EmbeddedDatabase Start(EmbeddedDatabaseConfiguration databaseConfi
8383
// HINT: If this is not set, then Raven will pick a default location relative to the server binaries
8484
// See https://github.com/ravendb/ravendb/issues/15694
8585
$"--Indexing.NuGetPackagesPath=\"{nugetPackagesPath}\"",
86+
// HINT: Storage.EnablePrefetching is server-wide only and defaults to true in RavenDB. ServiceControl
87+
// disables it by default. Set RAVEN_Storage_EnablePrefetching on the container image to change it there.
88+
"--Storage.EnablePrefetching=false",
8689
..optionalArgs
8790
],
8891
DataDirectory = databaseConfiguration.DbPath,

0 commit comments

Comments
 (0)