{"record":{"id":"767ed6576e046fb7","repo":"microsoft/FASTER","slug":"unsupported-checkpoint-type","errorCode":null,"errorMessage":"Unsupported checkpoint type","messagePattern":"Unsupported checkpoint type","errorType":"exception","errorClass":"FasterException","httpStatus":null,"severity":"error","filePath":"cs/src/core/Index/FASTER/FASTER.cs","lineNumber":383,"sourceCode":"        /// than current version. Actual new version may have version number greater than supplied number. If the supplied\n        /// number is -1, checkpoint will unconditionally create a new version. \n        /// </param>\n        /// <returns>Whether we could initiate the checkpoint. Use CompleteCheckpointAsync to wait completion.</returns>\n        public bool TryInitiateHybridLogCheckpoint(out Guid token, CheckpointType checkpointType, bool tryIncremental = false,\n            long targetVersion = -1)\n        {\n            ISynchronizationTask backend;\n            if (checkpointType == CheckpointType.FoldOver)\n                backend = new FoldOverCheckpointTask();\n            else if (checkpointType == CheckpointType.Snapshot)\n            {\n                if (tryIncremental && _lastSnapshotCheckpoint.info.guid != default && _lastSnapshotCheckpoint.info.finalLogicalAddress > hlog.FlushedUntilAddress && (hlog is not GenericAllocator<Key, Value>))\n                    backend = new IncrementalSnapshotCheckpointTask();\n                else\n                    backend = new SnapshotCheckpointTask();\n            }\n            else\n                throw new FasterException(\"Unsupported checkpoint type\");\n\n            var result = StartStateMachine(new HybridLogCheckpointStateMachine(backend, targetVersion));\n            token = _hybridLogCheckpointToken;\n            return result;\n        }\n\n        /// <summary>\n        /// Take log-only checkpoint\n        /// </summary>\n        /// <param name=\"checkpointType\">Checkpoint type</param>\n        /// <param name=\"tryIncremental\">For snapshot, try to store as incremental delta over last snapshot</param>\n        /// <param name=\"cancellationToken\">Cancellation token</param>\n        /// <param name=\"targetVersion\">\n        /// intended version number of the next version. Checkpoint will not execute if supplied version is not larger\n        /// than current version. Actual new version may have version number greater than supplied number. If the supplied\n        /// number is -1, checkpoint will unconditionally create a new version. \n        /// </param>\n        /// <returns>","sourceCodeStart":365,"sourceCodeEnd":401,"githubUrl":"https://github.com/microsoft/FASTER/blob/321d872eabda6a0345c8bd76419f89723ed864ae/cs/src/core/Index/FASTER/FASTER.cs#L365-L401","documentation":"TryInitiateHybridLogCheckpoint accepts FoldOver, Snapshot, and (conditionally) Snapshot with incremental support; any other CheckpointType value throws. Like error 124 but for the hybrid-log checkpoint path, where incremental snapshot tasks may substitute for plain snapshot when eligible.","triggerScenarios":"Calling TakeHybridLogCheckpointAsync/TryInitiateHybridLogCheckpoint with an undefined CheckpointType value (not FoldOver or Snapshot), e.g. from a mis-typed numeric cast.","commonSituations":"Same as full checkpoints: config-driven enum values, cross-version enum drift, deserialized values out of range.","solutions":["Pass only CheckpointType.FoldOver or CheckpointType.Snapshot","Validate the enum value before initiating the checkpoint","Keep the checkpoint type constants in sync with the library version in use"],"exampleFix":"// before\nawait fasterKV.TakeHybridLogCheckpointAsync((CheckpointType)cfg.HlogType);\n// after\nDebug.Assert(cfg.HlogType is CheckpointType.FoldOver or CheckpointType.Snapshot);\nawait fasterKV.TakeHybridLogCheckpointAsync(cfg.HlogType);","handlingStrategy":"validation","validationCode":"if (checkpointType is not (CheckpointType.FoldOver or CheckpointType.Snapshot))\n    throw new ArgumentException($\"Unsupported checkpoint type: {checkpointType}\");","typeGuard":null,"tryCatchPattern":"try { await fasterKV.TakeHybridLogCheckpointAsync(checkpointType); }\ncatch (FasterException ex) when (ex.Message == \"Unsupported checkpoint type\")\n{\n    await fasterKV.TakeHybridLogCheckpointAsync(CheckpointType.FoldOver); // safe default\n}","preventionTips":["Validate CheckpointType values parsed from external sources before use","Avoid numeric casts to CheckpointType; reference enum members directly","Pin the FASTER version so enum members are stable across deployments"],"tags":["checkpoint","enum","invalid-argument"],"backgroundTag":"invalid-enum-value","analyzedSha":"321d872eabda6a0345c8bd76419f89723ed864ae","analyzedAt":"2026-09-15T22:18:00.693Z","contentChangedAt":"2026-09-15T22:18:00.693Z","schemaVersion":2},"datasetVersion":"2026-09-23T02:17:17.105Z"}