{"record":{"id":"38ca6b8c5828c4e4","repo":"microsoft/garnet","slug":"range-index-preview-is-not-supported-in-cluster","errorCode":null,"errorMessage":"Range Index (preview) is not supported in cluster diskless mode.","messagePattern":"Range Index \\(preview\\) is not supported in cluster diskless mode\\.","errorType":"exception","errorClass":"GarnetException","httpStatus":null,"severity":"critical","filePath":"libs/host/GarnetServer.cs","lineNumber":193,"sourceCode":"            {\n                var red = \"\\u001b[31m\";\n                var magenta = \"\\u001b[35m\";\n                var normal = \"\\u001b[0m\";\n\n                Console.WriteLine($\"\"\"\n                    {red}    _________\n                       /_||___||_\\      {normal}Garnet {version} {(IntPtr.Size == 8 ? \"64\" : \"32\")} bit; {(opts.EnableCluster ? \"cluster\" : \"standalone\")} mode{red}\n                       '. \\   / .'      {normal}Listening on: {(opts.EndPoints.Length > 1 ? opts.EndPoints[0] + $\" and {opts.EndPoints.Length - 1} more\" : opts.EndPoints[0])}{red}\n                         '.\\ /.'        {magenta}https://aka.ms/GetGarnet{red}\n                           '.'\n                    {normal}\n                    \"\"\");\n            }\n\n            var clusterFactory = opts.EnableCluster ? new ClusterFactory() : null;\n\n            if (opts.ReplicaDisklessSync && opts.EnableRangeIndexPreview)\n                throw new GarnetException(\"Range Index (preview) is not supported in cluster diskless mode.\");\n\n            this.logger = this.loggerFactory?.CreateLogger(\"GarnetServer\");\n            logger?.LogInformation(\"Garnet {version} {bits} bit; {clusterMode} mode; Endpoint: [{endpoint}]\",\n                version, IntPtr.Size == 8 ? \"64\" : \"32\",\n                opts.EnableCluster ? \"cluster\" : \"standalone\",\n                string.Join(',', opts.EndPoints.Select(endpoint => endpoint.ToString())));\n            logger?.LogInformation(\"Environment .NET {netVersion}; {osPlatform}; {processArch}\", Environment.Version, Environment.OSVersion.Platform, RuntimeInformation.ProcessArchitecture);\n\n            // Flush initialization logs from memory logger\n            FlushMemoryLogger(this.initLogger, \"ArgParser\", this.loggerFactory);\n\n            var customCommandManager = new CustomCommandManager();\n\n            ThreadPool.GetMinThreads(out var minThreads, out var minCPThreads);\n            ThreadPool.GetMaxThreads(out var maxThreads, out var maxCPThreads);\n\n            bool minChanged = false, maxChanged = false;\n            if (opts.ThreadPoolMinThreads > 0)","sourceCodeStart":175,"sourceCodeEnd":211,"githubUrl":"https://github.com/microsoft/garnet/blob/951b0fc6838721f89d102c2bbe1b914e8d39d700/libs/host/GarnetServer.cs#L175-L211","documentation":"Thrown by GarnetServer.InitializeServer when both ReplicaDisklessSync and EnableRangeIndexPreview are enabled simultaneously. These features are incompatible: diskless replication does not materialize the RDB transfer on disk, but Range Index preview requires disk-backed snapshots. Garnet rejects this combination at startup rather than failing silently during replication.","triggerScenarios":"Configuring GarnetServerOptions with opts.ReplicaDisklessSync = true and opts.EnableRangeIndexPreview = true at the same time. The check is at GarnetServer.cs:192.","commonSituations":"Enabling Range Index preview on a cluster replica that was already configured for diskless sync; copying a config template that has both options set without understanding their interaction.","solutions":["If you need Range Index preview, disable ReplicaDisklessSync (set to false).","If you need diskless sync, disable EnableRangeIndexPreview (set to false).","Review your cluster replication strategy and choose one approach based on your operational needs."],"exampleFix":"// before\nvar opts = new GarnetServerOptions\n{\n    EnableCluster = true,\n    ReplicaDisklessSync = true,\n    EnableRangeIndexPreview = true\n};\n\n// after: pick one\nvar opts = new GarnetServerOptions\n{\n    EnableCluster = true,\n    ReplicaDisklessSync = false,\n    EnableRangeIndexPreview = true\n};","handlingStrategy":"validation","validationCode":"if (opts.ReplicaDisklessSync && opts.EnableRangeIndexPreview)\n    throw new InvalidOperationException(\n        \"Range Index preview and diskless replication are mutually exclusive. \" +\n        \"Disable one before starting the server.\");","typeGuard":"static bool AreReplicationOptionsValid(GarnetServerOptions opts) =>\n    !(opts.ReplicaDisklessSync && opts.EnableRangeIndexPreview);","tryCatchPattern":null,"preventionTips":["Review feature compatibility matrix before enabling multiple features.","Never set both ReplicaDisklessSync and EnableRangeIndexPreview to true.","Document feature conflicts in deployment runbooks."],"tags":["cluster","replication","feature-conflict","startup"],"backgroundTag":null,"analyzedSha":"951b0fc6838721f89d102c2bbe1b914e8d39d700","analyzedAt":"2026-08-13T19:01:32.939Z","schemaVersion":2},"datasetVersion":"2026-08-13T19:17:28.613Z"}