{"record":{"id":"5f811e76d9f5628a","repo":"microsoft/FASTER","slug":"unable-to-find-valid-hybridlog-token","errorCode":null,"errorMessage":"Unable to find valid HybridLog token","messagePattern":"Unable to find valid HybridLog token","errorType":"exception","errorClass":"FasterException","httpStatus":null,"severity":"critical","filePath":"cs/src/core/Index/Recovery/Recovery.cs","lineNumber":322,"sourceCode":"                    continue;\n                }\n\n                logger?.LogInformation(\"Index Checkpoint: {indexToken}\", indexToken);\n                recoveredICInfo.info.DebugPrint(logger);\n                closestToken = indexToken;\n                break;\n            }\n        }\n\n        private void FindRecoveryInfo(long requestedVersion, out HybridLogCheckpointInfo recoveredHlcInfo,\n            out IndexCheckpointInfo recoveredICInfo)\n        {\n            logger?.LogInformation(\"********* Primary Recovery Information ********\");\n\n            GetClosestHybridLogCheckpointInfo(requestedVersion, out var closestToken, out recoveredHlcInfo, out recoveredCommitCookie);\n\n            if (recoveredHlcInfo.IsDefault())\n                throw new FasterException(\"Unable to find valid HybridLog token\");\n\n            if (recoveredHlcInfo.deltaLog != null)\n            {\n                recoveredHlcInfo.Dispose();\n                // need to actually scan delta log now\n                recoveredHlcInfo.Recover(closestToken, checkpointManager, hlog.LogPageSizeBits, out _, true);\n            }\n            recoveredHlcInfo.info.DebugPrint(logger);\n\n            GetClosestIndexCheckpointInfo(ref recoveredHlcInfo, out _, out recoveredICInfo);\n\n            if (recoveredICInfo.IsDefault())\n            {\n                logger?.LogInformation(\"No index checkpoint found, recovering from beginning of log\");\n            }\n        }\n\n        private static bool IsCompatible(in IndexRecoveryInfo indexInfo, in HybridLogRecoveryInfo recoveryInfo)","sourceCodeStart":304,"sourceCodeEnd":340,"githubUrl":"https://github.com/microsoft/FASTER/blob/321d872eabda6a0345c8bd76419f89723ed864ae/cs/src/core/Index/Recovery/Recovery.cs#L304-L340","documentation":"During recovery, FASTER locates the HybridLog checkpoint closest to the requested recovery version via GetClosestHybridLogCheckpointInfo. If no HybridLog checkpoint information can be found (recoveredHlcInfo is default), there is no valid log token to recover from, and this FasterException is thrown. It means the checkpoint store contains no usable hybrid log token for the requested recovery point.","triggerScenarios":"Calling Recover(version)/RecoverAsync(version) on a FasterLog or FASTER instance when no HybridLog checkpoint exists in the checkpoint directory or checkpoint manager, when the hybrid log checkpoint files were deleted or partially written, or when recovering by version/index in a store that only ever took index-only checkpoints.","commonSituations":"Pointing recovery at the wrong checkpoint folder, running recovery before any TakeFullCheckpoint/TakeHybridLogCheckpoint completed, crash during checkpointing leaving an incomplete token entry, or a version/index passed that predates every available hybrid log checkpoint.","solutions":["List available checkpoints via checkpointManager and recover to a token/version that actually has a HybridLog checkpoint.","Take a full (or hybrid log) checkpoint with TakeFullCheckpoint or TakeHybridLogCheckpoint before attempting recovery.","Verify the checkpoint directory and checkpointManager configuration point to the store that produced the token.","If recovering to a specific version, ensure the checkpoint was taken with incremental snapshot support (fullSnapshot=false) so delta logs exist."],"exampleFix":"// before\nfaster.Recover(42); // fails: no hybrid log checkpoint covers version 42\n// after\nvar (ok, token) = await faster.TakeFullCheckpointAsync();\nawait checkpointManager.FinalizeCheckpoint(...);\nfaster.Recover(token); // recover to an existing token","handlingStrategy":"validation","validationCode":"// Before recovery, verify a hybrid log checkpoint exists for the target version\nvar available = checkpointManager.GetRecoverableHybridLogCheckpoints();\nif (available.Count == 0)\n    throw new InvalidOperationException(\"No hybrid log checkpoints available; take a full checkpoint first.\");","typeGuard":null,"tryCatchPattern":"try\n{\n    await faster.RecoverAsync(recoverVersion);\n}\ncatch (FasterException ex) when (ex.Message.Contains(\"Unable to find valid HybridLog token\"))\n{\n    logger.LogWarning(\"No valid hybrid log token; recovering latest or retaking checkpoint\");\n    await faster.TakeFullCheckpointAsync();\n}","preventionTips":["Schedule regular full/hybrid log checkpoints and verify they complete.","Never delete checkpoint directories while the process may recover from them.","Log every token produced by checkpointing and persist index+hybrid log tokens together."],"tags":["faster","recovery","checkpoint","hybridlog"],"backgroundTag":"resource-not-found","analyzedSha":"321d872eabda6a0345c8bd76419f89723ed864ae","analyzedAt":"2026-09-15T22:18:00.693Z","contentChangedAt":"2026-09-15T22:18:00.693Z","schemaVersion":2},"datasetVersion":"2026-09-16T04:17:20.429Z"}