microsoft/FASTER · warning
WARNING: Ignoring invalid *hlog* field
Error message
WARNING: Ignoring invalid *hlog* field '%s'
What it means
Faster's C++ config parser (config.h, PopulateHlogConfig) validates that every key inside the [hlog] TOML table is one of the known hlog fields: in_mem_size_mb, mutable_fraction, pre_allocate, compaction. Unknown keys are not fatal: the parser prints this WARNING to stderr and ignores the field, so a typo silently falls back to the default value.
Solutions
- Rename the key to one of the valid fields: in_mem_size_mb, mutable_fraction, pre_allocate, compaction.
- Check stderr for the warning and verify the intended value is actually being applied (log the resulting HlogConfig).
- Match the field names to the Faster version you compiled against; consult config.h for the supported set.
Example fix
// before (toml) [hlog] in_mem_size = 512 // after [hlog] in_mem_size_mb = 512
Defensive patterns
Strategy: validation
Validate before calling
const VALID = new Set(["in_mem_size_mb", "mutable_fraction", "pre_allocate", "compaction"]);
for (const key of Object.keys(toml.hlog ?? {}))
if (!VALID.has(key)) console.warn(`invalid hlog field: ${key}`); Prevention
- Validate config keys against the valid set (in_mem_size_mb, mutable_fraction, pre_allocate, compaction) before parsing.
- Watch stderr for 'WARNING: Ignoring invalid *hlog* field' at startup.
- Copy field names from the config.h of the exact Faster version you build against.
- Log the resulting parsed HlogConfig to confirm intended values were applied.
When it happens
Trigger: Supplying a TOML config string with a misspelled or unsupported hlog key (e.g. in_mem_size, mutible_fraction, 'InMemSizeMb'), or a key from a newer/older Faster version not supported by the linked parser.
Common situations: Typos in config files; copying config examples between Faster versions with renamed fields; using snake_case vs camelCase inconsistently; unnoticed because the app continues with defaults.
Understand the failure class
Background: "Invalid value" and "allowed values are" config errors: what your library rejected and how to fix it — this error's family across 41 libraries.
Related errors
- WARNING: Ignoring invalid *hlog-compaction* field
- warning: ignoring invalid *read-cache* field
- WARNING: Ignoring invalid top-level field
- WARNING: Ignoring invalid *index* field
- WARNING: Ignoring invalid *index* field
AI-assisted analysis of microsoft/FASTER@321d872eab (2026-09-15).
Data as JSON: /api/errors/f055839fc0c489c9.
Report an issue: GitHub.
Appendix: source
Thrown at cc/src/core/config.h:118
}
};
// FASTER store config
#ifdef TOML_CONFIG
HlogConfig PopulateHlogConfig(const toml::value& hlog_table) {
// hlog
const uint64_t in_mem_size = toml::find<uint64_t>(hlog_table, "in_mem_size_mb") * (1 << 20);
// toml11 does not parse ints if 'double' type is specified; the following implements the intended behavior
double mutable_fraction = toml::find_or<int>(hlog_table, "mutable_fraction", -1); // -1 "means" not found with int type
mutable_fraction = (mutable_fraction < 0) ? toml::find_or<double>(hlog_table, "mutable_fraction", DEFAULT_HLOG_MUTABLE_FRACTION) : mutable_fraction;
const bool pre_allocate = toml::find_or<bool>(hlog_table, "pre_allocate", false);
const std::vector<std::string> VALID_HLOG_FIELDS = { "in_mem_size_mb", "mutable_fraction", "pre_allocate", "compaction" };
for (auto& it : toml::get<toml::table>(hlog_table)) {
if (std::find(VALID_HLOG_FIELDS.begin(), VALID_HLOG_FIELDS.end(), it.first) == VALID_HLOG_FIELDS.end()) {
fprintf(stderr, "WARNING: Ignoring invalid *hlog* field '%s'\n", it.first.c_str());
}
}
return { in_mem_size, mutable_fraction, pre_allocate };
}
HlogCompactionConfig PopulateHlogCompactionConfig(const toml::value& hlog_table) {
// hlog.compaction
HlogCompactionConfig hlog_compaction_config{ .enabled = false };
if (hlog_table.contains("compaction")) {
const auto compaction_table = toml::find(hlog_table, "compaction");
hlog_compaction_config.enabled = toml::find_or<bool>(compaction_table, "enabled", hlog_compaction_config.enabled);
hlog_compaction_config.hlog_size_budget = toml::find<uint64_t>(compaction_table, "hlog_size_budget_mb") * (1 << 20);
hlog_compaction_config.max_compacted_size = compaction_table.contains("max_compacted_size_mb")
? toml::find<uint64_t>(compaction_table, "max_compacted_size_mb") * (1 << 20)
: hlog_compaction_config.max_compacted_size;
hlog_compaction_config.trigger_pct = toml::find_or<double>(compaction_table, "trigger_pct", hlog_compaction_config.trigger_pct);
hlog_compaction_config.compact_pct = toml::find_or<double>(compaction_table, "compact_pct", hlog_compaction_config.compact_pct);View on GitHub (pinned to 321d872eab)