microsoft/FASTER · warning
WARNING: Ignoring invalid *hlog-compaction* field
Error message
WARNING: Ignoring invalid *hlog-compaction* field '%s'
What it means
When parsing the [hlog-compaction] TOML table, FASTER validates each key against a whitelist of known fields (enabled, hlog_size_budget_mb, max_compacted_size_mb, trigger_pct, compact_pct, check_interval_ms, num_threads). Unknown keys are skipped entirely and this warning is printed to stderr; the setting silently has no effect.
Solutions
- Check the key name against the valid list: enabled, hlog_size_budget_mb, max_compacted_size_mb, trigger_pct, compact_pct, check_interval_ms, num_threads
- Fix the typo or remove the unknown key from the [hlog-compaction] section
- Consult the FASTER version's config.h to confirm which fields your version supports
Example fix
// before [hlog-compaction] num_thread = 4 // after [hlog-compaction] num_threads = 4
Defensive patterns
Strategy: validation
Validate before calling
static const std::set<std::string> valid = {"enabled","hlog_size_budget_mb","max_compacted_size_mb","trigger_pct","compact_pct","check_interval_ms","num_threads"};
for (const auto& [k, v] : hlogCompactionTable)
if (!valid.count(k)) throw std::invalid_argument("invalid hlog-compaction field: " + k); Prevention
- Keep a copy of the whitelist next to your config template
- Lint TOML configs against valid keys in CI
- Test new configs with a startup smoke run and check stderr
When it happens
Trigger: Calling F2Kv::FromConfigString with a config string whose hlog-compaction table contains a key not in VALID_HLOG_COMPACTION_FIELDS (e.g. a typo like 'num_thread' or 'thread_count').
Common situations: Renamed config keys across FASTER versions, hand-edited TOML configs with typos, copying fields from other config sections (e.g. read-cache) into hlog-compaction.
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* 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/d63b21a176cdabda.
Report an issue: GitHub.
Appendix: source
Thrown at cc/src/core/config.h:146
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);
hlog_compaction_config.check_interval = compaction_table.contains("check_interval_ms")
? std::chrono::milliseconds(toml::find<size_t>(compaction_table, "check_interval_ms"))
: hlog_compaction_config.check_interval;
hlog_compaction_config.num_threads = static_cast<uint8_t>(toml::find_or<int>(compaction_table, "num_threads", hlog_compaction_config.num_threads));
const std::vector<std::string> VALID_HLOG_COMPACTION_FIELDS = {
"enabled", "hlog_size_budget_mb", "max_compacted_size_mb", "trigger_pct", "compact_pct", "check_interval_ms", "num_threads" };
for (auto& it : toml::get<toml::table>(compaction_table)) {
if (std::find(VALID_HLOG_COMPACTION_FIELDS.begin(), VALID_HLOG_COMPACTION_FIELDS.end(), it.first) == VALID_HLOG_COMPACTION_FIELDS.end()) {
fprintf(stderr, "WARNING: Ignoring invalid *hlog-compaction* field '%s'\n", it.first.c_str());
}
}
}
return hlog_compaction_config;
}
template<bool IsColdStore>
ReadCacheConfig PopulateReadCacheConfig(const toml::value& top_table);
template<>
ReadCacheConfig PopulateReadCacheConfig<true>(const toml::value& top_table) {
ReadCacheConfig rc_config{ .enabled = false };
if (top_table.contains("read_cache")) {
throw std::runtime_error{ "Found invalid 'read_cache' definition for cold store." };
}
return rc_config;
}View on GitHub (pinned to 321d872eab)