You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Context for auto-checkpoints (command, operation, preview)
State Types
Type
Description
DestructiveOp
Enum of destructive operations that trigger auto-checkpoints
OperationPreview
Summary and sample data for confirmation prompts
CheckpointMetadata
Statistics for validation (tables, nodes, embeddings)
RelationalMeta
Table and row counts
GraphMeta
Node and edge counts
VectorMeta
Embedding count
Error Types
Variant
Description
Common Cause
NotFound
Checkpoint not found by ID or name
Typo in checkpoint name or ID was pruned by retention
Storage
Blob storage error
Disk full, permissions issue
Serialization
Bincode serialization error
Corrupt in-memory state
Deserialization
Bincode deserialization error
Corrupt checkpoint file
Blob
Underlying blob store error
BlobStore not initialized
Snapshot
TensorStore snapshot error
Store locked or corrupted
Cancelled
Operation cancelled by user
User rejected confirmation prompt
InvalidId
Invalid checkpoint identifier
Empty or malformed ID string
Retention
Retention enforcement error
Failed to delete old checkpoints
CheckpointManager
implCheckpointManager{/// Create manager with blob storage and configurationpubasyncfnnew(blob:Arc<Mutex<BlobStore>>,config:CheckpointConfig) -> Self;/// Create a manual checkpointpubasyncfncreate(&self,name:Option<&str>,store:&TensorStore) -> Result<String>;/// Create an auto-checkpoint before destructive operationpubasyncfncreate_auto(&self,command:&str,op:DestructiveOp,preview:OperationPreview,store:&TensorStore) -> Result<String>;/// Rollback to a checkpoint by ID or namepubasyncfnrollback(&self,id_or_name:&str,store:&TensorStore) -> Result<()>;/// List checkpoints, most recent firstpubasyncfnlist(&self,limit:Option<usize>) -> Result<Vec<CheckpointInfo>>;/// Delete a checkpoint by ID or namepubasyncfndelete(&self,id_or_name:&str) -> Result<()>;/// Generate preview for a destructive operationpubfngenerate_preview(&self,op:&DestructiveOp,sample_data:Vec<String>) -> OperationPreview;/// Request user confirmation for an operationpubfnrequest_confirmation(&self,op:&DestructiveOp,preview:&OperationPreview) -> bool;/// Set custom confirmation handlerpubfnset_confirmation_handler(&mutself,handler:Arc<dynConfirmationHandler>);/// Check if auto-checkpoint is enabledpubfnauto_checkpoint_enabled(&self) -> bool;/// Check if interactive confirmation is enabledpubfninteractive_confirm_enabled(&self) -> bool;/// Access the current configurationpubfnconfig(&self) -> &CheckpointConfig;}
Internal storage layer for checkpoint persistence:
implCheckpointStorage{/// Store a checkpoint state to blob storagepubasyncfnstore(state:&CheckpointState,blob:&BlobStore) -> Result<String>;/// Load a checkpoint by ID or namepubasyncfnload(checkpoint_id:&str,blob:&BlobStore) -> Result<CheckpointState>;/// List all checkpoints (sorted by created_at descending)pubasyncfnlist(blob:&BlobStore) -> Result<Vec<CheckpointInfo>>;/// Delete a checkpoint by artifact IDpubasyncfndelete(artifact_id:&str,blob:&BlobStore) -> Result<()>;}
let config = CheckpointConfig::default().with_max_checkpoints(20).with_auto_checkpoint(true).with_interactive_confirm(false).with_preview_sample_size(10);
Configuration Presets
Preset
max_checkpoints
auto_checkpoint
interactive_confirm
Use Case
Default
10
true
true
Interactive CLI usage
Automated
20
true
false
Batch processing scripts
Minimal
3
false
false
Memory-constrained environments
Safe
50
true
true
Production with high retention
DestructiveOp
Operations that trigger auto-checkpoints when auto_checkpoint is enabled:
-- Named checkpoint
CHECKPOINT 'before-migration'-- Auto-generated name (checkpoint-{timestamp})
CHECKPOINT
CHECKPOINTS
-- List all checkpoints
CHECKPOINTS
-- List last N checkpoints
CHECKPOINTS LIMIT10
Returns: ID, Name, Created, Type (manual/auto)
ROLLBACK TO
-- By nameROLLBACK TO 'checkpoint-name'-- By IDROLLBACK TO 'uuid-string'
Storage Format
Checkpoints are stored as blob artifacts using content-addressable storage:
Property
Value
Tag
_system:checkpoint
Content-Type
application/x-neumann-checkpoint
Format
bincode-serialized CheckpointState
Filename
checkpoint_{id}.ncp
Creator
system:checkpoint
CheckpointState Structure
#[derive(Serialize,Deserialize)]pubstructCheckpointState{pubid:String,// UUID v4pubname:String,// User-provided or auto-generatedpubcreated_at:u64,// Unix timestamp (seconds)pubtrigger:Option<CheckpointTrigger>,// For auto-checkpointspubstore_snapshot:Vec<u8>,// Serialized SlabRouterSnapshotpubmetadata:CheckpointMetadata,}
Artifact Metadata Keys
Key
Type
Description
checkpoint_id
String
UUID identifier
checkpoint_name
String
User-provided or auto-generated name
created_at
String
Unix timestamp (parsed to u64)
trigger
String
Operation name (for auto-checkpoints only)
Size Formatting
Blob sizes in previews are formatted for readability:
Bytes
Display
< 1024
"N bytes"
>= 1 KB
"N.NN KB"
>= 1 MB
"N.NN MB"
>= 1 GB
"N.NN GB"
Performance
Store Size
Checkpoint Time
Rollback Time
Memory
1K entries
~5ms
~3ms
~100KB
10K entries
~50ms
~30ms
~1MB
100K entries
~500ms
~300ms
~10MB
1M entries
~5s
~3s
~100MB
Edge Cases and Gotchas
Name vs ID conflict: If a checkpoint is named with a valid UUID format, it
may conflict with ID lookup (exact match on ID is checked first, then name).
Auto-generated names: When no name is provided, format is
checkpoint-{unix_seconds}. Auto-checkpoints use auto-before-{operation-name}.
Timestamp edge cases: System time before epoch produces timestamp 0; rapid
creation may produce identical second-granularity timestamps.
Blob dependency: Always call init_blob() before init_checkpoint() on
the query router, or initialization will fail.
Limitations
Full snapshots only (no incremental checkpoints)
Single-node operation (no distributed checkpoints)
In-memory restore (entire snapshot loaded)
No automatic scheduling (manual or trigger-based only)
Not atomic (partial restore possible on failure)
No encryption (checkpoints stored in plaintext)
Bloom filter state not preserved (rebuilt on load if needed)