microsoft/FASTER · error
Compact COLD log failed! :(
Error message
Compact COLD log failed! :(
What it means
The cold-log compaction step inside Checkpoint (CompactLog on the COLD store) returned false. The cold log was not compacted; like the hot variant this is logged and the checkpoint flow continues, but cold-log space was not reclaimed.
Solutions
- Retry the compaction/checkpoint — transient reader contention is the most common cause.
- Raise cold_log_compaction_config.num_threads.
- Ensure until_address is a valid, flushed address within the cold log.
- Verify no sessions are pinning old cold-log regions; stop idle sessions before compacting.
Example fix
// before
kv.CompactLog(until_address, 1);
// after
bool ok = kv.CompactLog(until_address, cold_cfg.num_threads);
if (!ok) { /* schedule retry */ } Defensive patterns
Strategy: retry
Validate before calling
// before cold-log compaction if (!cold_store.HasActiveSession()) cold_store.StartSession(); uint64_t until = cold_store.hlog.flushed_until_address; if (until == 0) return;
Prevention
- Stop idle sessions that pin old cold-log regions.
- Use enough cold_log_compaction_config.num_threads.
- Retry failed compaction cycles instead of aborting the checkpoint.
- Monitor cold-log size trend to catch persistent compaction failure.
When it happens
Trigger: ShouldCompactHlog triggers on the cold store (cold_log_compaction_config thresholds exceeded) and CompactLog(cold_store, StoreType::COLD, ...) fails — invalid until_address, insufficient compaction threads, or an internal fold failure over cold-log segments.
Common situations: Auto-compaction of the cold log under sustained ingest; cold_log_compaction_config.num_threads too low; compacting a cold log with many immutable segments still referenced by active readers.
Understand the failure class
Background: Database query failed: Internal Server Error 500s wrapping SQL, Prisma, and connection failures — what to check first — this error's family across 16 libraries.
Related errors
- Cold store checkpoint failed!
- Compact HOT log failed! :(
- Unable to find valid HybridLog token
- Unexpected checkpoint status for COLD store
- Unexpected checkpoint status
AI-assisted analysis of microsoft/FASTER@321d872eab (2026-09-15).
Data as JSON: /api/errors/83169bb3420ebe0b.
Report an issue: GitHub.
Appendix: source
Thrown at cc/src/core/f2.h:945
// Hot-Cold compaction (optional cold-log checkpoint)
if (ShouldCompactHlog(hot_store, StoreType::HOT, hot_log_compaction_config, until_address)) {
hot_store.StartSession();
cold_store.StartSession();
if (!CompactLog(hot_store, StoreType::HOT, until_address, true,
hot_log_compaction_config.num_threads, should_checkpoint_cold_store())) {
log_error("Compact HOT log failed! :(");
}
cold_store.StopSession();
hot_store.StopSession();
}
// Cold-Cold compaction (optional cold-log checkpoint)
if (ShouldCompactHlog(cold_store, StoreType::COLD, cold_log_compaction_config, until_address)) {
cold_store.StartSession();
if (!CompactLog(cold_store, StoreType::COLD, until_address, true,
cold_log_compaction_config.num_threads, should_checkpoint_cold_store())) {
log_error("Compact COLD log failed! :(");
}
cold_store.StopSession();
}
wait = (checkpoint_.hot_store_status != StoreCheckpointStatus::REQUESTED &&
!ShouldCompactHlog(hot_store, StoreType::HOT, hot_log_compaction_config, until_address) &&
!ShouldCompactHlog(cold_store, StoreType::COLD, cold_log_compaction_config, until_address));
if (wait) {
compaction_scheduled_.store(false);
std::this_thread::sleep_for(check_interval);
}
} while(background_worker_active_.load());
compaction_scheduled_.store(false);
}
template<class K, class V, class D, class HHI, class CHI>View on GitHub (pinned to 321d872eab)