microsoft/FASTER · critical · FasterException
Unable to recover from previous commit. Inner exception:
Error message
Unable to recover from previous commit. Inner exception:
What it means
FasterLogRecoveryInfo.Initialize failed while reading the persisted commit metadata stream (version/cookie/commit num) from the commit manager's recovery file (FasterLogRecoveryInfo.cs:91). The underlying I/O or format exception is wrapped in this FasterException to mark the log unrecoverable from the previous commit.
Solutions
- Inspect the inner exception (it is appended to the message) to identify whether it is I/O or format related and fix the underlying cause (permissions, disk, network storage).
- Restore the commit metadata (and log) from the last good checkpoint.
- Ensure the entire log directory (metadata + device files) is moved/restored atomically as a set.
- Do not edit or truncate commit metadata files manually; use FasterLog APIs or delete the whole stale log set and start fresh if data loss is acceptable.
Example fix
// before
var log = new FasterLog(new FasterLogOptions(path)); // throws on corrupt metadata
// after
try { log = new FasterLog(new FasterLogOptions(path)); }
catch (FasterException ex) when (ex.Message.StartsWith("Unable to recover"))
{
// restore from checkpoint or reinitialize the log directory
} Defensive patterns
Strategy: try-catch
Try / catch
try { log = new FasterLog(options); } catch (FasterException ex) when (ex.Message.StartsWith("Unable to recover from previous commit")) { RestoreFromCheckpoint(); } Prevention
- Keep checkpoints and commit metadata together as one atomic set
- Test crash-during-commit scenarios
- Log and alert on the wrapped inner exception
When it happens
Trigger: Opening a FasterLog whose commit metadata file is missing bytes, truncated by a crash mid-write, or written in an unreadable format; I/O errors (permissions, disk failure) while reading the recovery info; deserializing a file from a different FasterLog version.
Common situations: Crash or power loss while CommitAsync was flushing metadata; hand-copied or partially synced log directories; committing metadata on one storage medium and reading from a stale replica.
Understand the failure class
Background: "failed to read file", EACCES, ENOENT and "could not read <path>" errors: when a program can't read a file from disk — this error's family across 49 libraries.
Related errors
- Uninitialized page found during scan at page
- Invalid checksum found during commit recovery
- Unexpected entry type
- Already recovered until address
- This method can only be used with a read-only FasterLog…
AI-assisted analysis of microsoft/FASTER@321d872eab (2026-09-15).
Data as JSON: /api/errors/12bd0e6fad3b67ab.
Report an issue: GitHub.
Appendix: source
Thrown at cs/src/core/FasterLog/FasterLogRecoveryInfo.cs:91
/// <param name="reader"></param>
public void Initialize(BinaryReader reader)
{
int version;
long checkSum;
try
{
version = reader.ReadInt32();
checkSum = reader.ReadInt64();
BeginAddress = reader.ReadInt64();
UntilAddress = reader.ReadInt64();
if (version > 0)
CommitNum = reader.ReadInt64();
else
CommitNum = -1;
}
catch (Exception e)
{
throw new FasterException("Unable to recover from previous commit. Inner exception: " + e.ToString());
}
if (version < 0 || version > FasterLogRecoveryVersion)
throw new FasterException("Invalid version found during commit recovery");
var iteratorCount = 0;
try
{
iteratorCount = reader.ReadInt32();
}
catch { }
if (iteratorCount > 0)
{
Iterators = new Dictionary<string, long>();
for (int i = 0; i < iteratorCount; i++)
{
int len = reader.ReadInt32();
byte[] bytes = reader.ReadBytes(len);View on GitHub (pinned to 321d872eab)