microsoft/FASTER · error · Exception

LogDir specified without enabling tiered storage…

Error message

LogDir specified without enabling tiered storage (UseStorage)

What it means

In ServerOptions.GetSettings, LogDir is only honored when tiered storage is enabled via UseStorage. If UseStorage is false the store uses a NullDevice (in-memory), and a leftover LogDir setting is contradictory — data would never be written there — so FASTER throws to surface the conflicting configuration.

Solutions

  1. Set UseStorage = true if you want on-disk (tiered) storage, keeping LogDir.
  2. Otherwise set LogDir = null when UseStorage is false.
  3. Scrub LogDir from config files/env used for in-memory deployments.

Example fix

// before
options.UseStorage = false;
options.LogDir = "/data/logs"; // throws
// after
options.UseStorage = false;
options.LogDir = null;
Defensive patterns

Strategy: validation

Validate before calling

if (!options.UseStorage && options.LogDir != null) options.LogDir = null; // scrub LogDir for in-memory mode

Try / catch

try { settings = options.GetSettings(); } catch (Exception) { options.UseStorage = true; settings = options.GetSettings(); }

Prevention

When it happens

Trigger: Setting ServerOptions.LogDir (or leaving it set from config/defaults) while UseStorage is false/unset, then calling GetSettings (invoked by GenericServer/VarlenServer construction).

Common situations: Using ServerSettings/ServerOptions in in-memory mode but a template config still carries LogDir; removing UseStorage=true to test in-memory mode and forgetting LogDir; environment-driven configs where LogDir is always populated.

Understand the failure class

Background: Conflicting config options: "cannot be used together" — configuration validation errors across open-source libraries — this error's family across 162 libraries.

Related errors


AI-assisted analysis of microsoft/FASTER@321d872eab (2026-09-15). Data as JSON: /api/errors/5e734b099eda6963. Report an issue: GitHub.

Appendix: source

Thrown at cs/remote/src/FASTER.server/Servers/ServerOptions.cs:189

            logger?.LogInformation($"[Store] There are {PrettySize(1 << (logSettings.MemorySizeBits - logSettings.PageSizeBits))} log pages in memory");

            logSettings.SegmentSizeBits = SegmentSizeBits();
            logger?.LogInformation($"[Store] Using disk segment size of {PrettySize((long)Math.Pow(2, logSettings.SegmentSizeBits))}");

            indexSize = IndexSizeCachelines();
            logger?.LogInformation($"[Store] Using hash index size of {PrettySize(indexSize * 64L)} ({PrettySize(indexSize)} cache lines)");

            if (EnableStorageTier)
            {
                if (LogDir is null or "")
                    LogDir = Directory.GetCurrentDirectory();
                logSettings.LogDevice = Devices.CreateLogDevice(LogDir + "/Store/hlog");
            }
            else
            {
                if (LogDir != null)
                    throw new Exception("LogDir specified without enabling tiered storage (UseStorage)");
                logSettings.LogDevice = new NullDevice();
            }

            if (CheckpointDir == null) CheckpointDir = LogDir;

            if (CheckpointDir is null or "")
                CheckpointDir = Directory.GetCurrentDirectory();

            checkpointSettings = new CheckpointSettings
            {
                CheckpointDir = CheckpointDir + "/Store/checkpoints",
                RemoveOutdated = true,
            };
        }

        /// <summary>
        /// Parse size from string specification
        /// </summary>

View on GitHub (pinned to 321d872eab)