Skip to content

Commit

Permalink
chore: fix storage options
Browse files Browse the repository at this point in the history
  • Loading branch information
arriqaaq committed Nov 13, 2024
1 parent c4ccd5c commit d03e680
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,8 @@ opts.dir = "path/to/db".into(); // Database directory path

// Storage configuration
opts.disk_persistence = true; // false for in-memory only operation
opts.max_value_threshold = 4096; // Values larger than this stored in separate files
opts.max_segment_size = 268_435_456; // 256MB default segment size
opts.max_value_threshold = 4096; // Values smaller than this stored in memory
opts.max_segment_size = 268_435_456; // 256MB segment size
opts.max_compaction_segment_size = 1_073_741_824; // 1GB max compaction segment

// Transaction and versioning
Expand All @@ -66,9 +66,8 @@ let store = Store::new(opts).expect("failed to create store");
### Storage Options

- `disk_persistence`: Controls whether data is persisted to disk or kept only in memory
- `max_value_threshold`: Values exceeding this size are stored in separate files for better memory management
- `max_value_threshold`: Values within this size are stored and served directly from memory
- `max_segment_size`: Controls when new log segments are created, affects compaction frequency
- `max_compaction_segment_size`: Maximum size of segments after compaction

### Transaction Options

Expand Down

0 comments on commit d03e680

Please sign in to comment.