{"record":{"id":"955464ea96335872","repo":"microsoft/FASTER","slug":"incremental-snapshots-not-supported-with-generic-allocator","errorCode":null,"errorMessage":"Incremental snapshots not supported with generic allocator","messagePattern":"Incremental snapshots not supported with generic allocator","errorType":"exception","errorClass":"FasterException","httpStatus":null,"severity":"error","filePath":"cs/src/core/Allocator/GenericAllocator.cs","lineNumber":1143,"sourceCode":"            int start = (int)(beginAddress & PageSizeMask) / recordSize;\n            int count = (int)(endAddress - beginAddress) / recordSize;\n            int end = start + count;\n            using var iter = new MemoryPageScanIterator<Key, Value>(values[page], start, end, pageStartAddress, recordSize);\n            Debug.Assert(epoch.ThisInstanceProtected());\n            try\n            {\n                epoch.Suspend();\n                observer?.OnNext(iter);\n            }\n            finally\n            {\n                epoch.Resume();\n            }\n        }\n\n        internal override void AsyncFlushDeltaToDevice(long startAddress, long endAddress, long prevEndAddress, long version, DeltaLog deltaLog, out SemaphoreSlim completedSemaphore, int throttleCheckpointFlushDelayMs)\n        {\n            throw new FasterException(\"Incremental snapshots not supported with generic allocator\");\n        }\n    }\n}\n","sourceCodeStart":1125,"sourceCodeEnd":1147,"githubUrl":"https://github.com/microsoft/FASTER/blob/321d872eabda6a0345c8bd76419f89723ed864ae/cs/src/core/Allocator/GenericAllocator.cs#L1125-L1147","documentation":"FASTER's delta (incremental) checkpointing flushes only changed pages via AsyncFlushDeltaToDevice, but GenericAllocator does not implement incremental snapshot support because its records are variable-size and not page-partitioned like other allocators. The override unconditionally throws FasterException, so any checkpoint with CheckpointType.FoldOver or delta log usage against a generic-allocator store fails immediately.","triggerScenarios":"Calling TakeCheckpoint / checkpoint APIs with delta log parameters (AsyncFlushDeltaToDevice path) on a store backed by GenericAllocator (variable-length key-values); passing a non-null DeltaLog to a checkpoint on a generic-allocator instance.","commonSituations":"Users enabling incremental checkpoints (to speed up checkpointing of large stores) without realizing the setting only applies to FASTER's fixed-size allocators; shared checkpoint configuration code applied across stores with different allocators.","solutions":["Use full (non-incremental) snapshots: issue a normal checkpoint without delta log parameters","Switch the store's allocator to a fixed-size one (e.g. FastMemoryAllocator/FixedPageSize allocator for blittable value types) if incremental snapshots are required","Guard configuration so delta-log checkpoints are only requested for stores whose allocator supports them","Upgrade FASTER: check release notes in case a newer version adds generic-allocator incremental snapshot support"],"exampleFix":"// before\ncheckpointManager.TakeCheckpoint(token, CheckpointType.FoldOver, deltaLog: deltaLog);\n// after (generic allocator)\ncheckpointManager.TakeCheckpoint(token, CheckpointType.FoldOver); // full snapshot only","handlingStrategy":"try-catch","validationCode":"// Only request delta checkpoints for allocators that support them\nbool supportsDelta = !(store is GenericAllocator<...>); // or track a config flag\nif (supportsDelta) takeDeltaCheckpoint(); else takeFullSnapshot();","typeGuard":"bool SupportsIncrementalSnapshots(object allocator) => allocator is not Microsoft.FASTER.Core.GenericAllocator<,>;","tryCatchPattern":"try\n{\n    checkpointManager.TakeCheckpoint(token, CheckpointType.FoldOver, deltaLog);\n}\ncatch (FasterException ex) when (ex.Message.Contains(\"Incremental snapshots not supported\"))\n{\n    checkpointManager.TakeCheckpoint(token, CheckpointType.FoldOver); // fall back to full snapshot\n}","preventionTips":["Never pass delta logs to checkpoints on generic-allocator stores","Centralize checkpoint configuration and assert allocator support once at startup","Prefer full snapshots with variable-length (generic allocator) workloads","Pin the FASTER version and check release notes before enabling incremental snapshots"],"tags":["faster","allocator","checkpointing","unsupported-operation"],"backgroundTag":"unsupported-operation","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"}