This documentation is part of the "Projects with Books" initiative at zenOSmosis.
The source code for this project is available on GitHub.
Version History and Migration
Loading…
Version History and Migration
Relevant source files
This page documents the version history of simd-r-drive, tracking breaking changes, file format evolution, and providing actionable migration guides for upgrading between versions. For information about building and testing procedures, see Building and Testing. For CI/CD pipeline details, see CI/CD Pipeline.
Versioning Strategy
The project follows a modified Semantic Versioning approach while in alpha status:
| Version Component | Meaning |
|---|---|
0.MINOR.PATCH-alpha | Current alpha phase format |
MINOR increment | Breaking changes, including on-disk format changes |
PATCH increment | Non-breaking changes, bug fixes, dependency updates |
-alpha suffix | Indicates pre-1.0 status with possible instability |
Breaking Change Policy : Any change to the on-disk storage format or core API that prevents backward compatibility results in a MINOR version bump. The project maintains a strict policy of documenting all breaking changes in the changelog with migration instructions.
Sources : CHANGELOG.md:1-5
Version Timeline
The following diagram shows the evolution of major versions and their breaking changes:
Sources : CHANGELOG.md:19-82
timeline
title "simd-r-drive Version History"
section 0.14.x Series
0.14.0-alpha : Introduced payload alignment
: Added pre-padding mechanism
: 16-byte default alignment
: BREAKING: Format incompatible with 0.13.x\nsection 0.15.x Series\n0.15.0-alpha : Increased alignment to 64 bytes\n: Added debug alignment assertions\n: BREAKING: Format incompatible with 0.14.x\n0.15.5-alpha : Arrow dependency bump to 57.0.0\n: No format changes
Breaking Changes History
Version 0.15.5-alpha (2025-10-27)
Type : Non-breaking maintenance release
Changes :
- Apache Arrow dependency updated to version 57.0.0
- Affects
arrowfeature flag only - No changes to
DataStore,EntryHandle, or storage format - No migration required
Sources : CHANGELOG.md:19-22
Version 0.15.0-alpha (2025-09-25)
Type : BREAKING - On-disk format incompatible with 0.14.x
Critical Changes :
The PAYLOAD_ALIGNMENT constant in src/storage_engine/constants.rs increased from 16 bytes (log₂ = 4) to 64 bytes (log₂ = 6). This ensures safe zero-copy access for:
- SSE: 16-byte operations
- AVX2: 32-byte operations
- AVX-512: 64-byte operations
- CPU cache lines: 64 bytes on modern x86_64/ARM
Title : On-Disk Format Comparison: 0.14.x vs 0.15.x
Added Features :
debug_assert_aligned(ptr: *const u8, align: usize)in simd-r-drive-entry-handle/src/debug_assert_aligned.rs:26-43- Validates pointer alignment at runtime in debug/test builds
- No-op in release builds (zero cost abstraction)
debug_assert_aligned_offset(off: u64)in simd-r-drive-entry-handle/src/debug_assert_aligned.rs:66-88- Validates file offset alignment using
PAYLOAD_ALIGNMENTconstant - Checks
off.is_multiple_of(PAYLOAD_ALIGNMENT)
- Validates file offset alignment using
- Enhanced
EntryHandle::as_arrow_buffer()with alignment assertions - Enhanced
EntryHandle::into_arrow_buffer()with alignment assertions
Affected Code Entities :
| Entity | Location | Change |
|---|---|---|
PAYLOAD_ALIGN_LOG2 | src/storage_engine/constants.rs | 4 → 6 |
PAYLOAD_ALIGNMENT | src/storage_engine/constants.rs | 16 → 64 |
| Write path pre-padding calculation | Storage engine | Uses new alignment value |
| Read path offset calculation | Storage engine | Expects new alignment |
EntryMetadata parsing | Storage engine | Unchanged (20 bytes) |
Technical Incompatibility Details :
When a 0.14.x reader opens a 0.15.x file:
- Incorrect offset calculation : Reader calculates
payload_start = metadata_end + (16 - offset % 16) % 16 - Actual offset : File contains
payload_start = metadata_end + (64 - offset % 64) % 64 - Result : Reader may access pre-pad bytes or miss payload start, causing:
- CRC32 checksum failures
- Deserialization errors
- Silent data corruption if payload happens to parse
Title : Read Operation Failure in Mixed Versions
Sources : CHANGELOG.md:25-52 simd-r-drive-entry-handle/src/debug_assert_aligned.rs:1-88
Version 0.14.0-alpha (2025-09-08)
Type : BREAKING - On-disk format incompatible with 0.13.x
Critical Changes :
First version to introduce configurable payload alignment via pre-padding mechanism. Payloads now guaranteed to start at addresses that are multiples of PAYLOAD_ALIGNMENT.
Title : Introduction of Pre-Padding in 0.14.0-alpha
New Constants Introduced :
| Constant | Value (0.14.0) | Type | Description |
|---|---|---|---|
PAYLOAD_ALIGN_LOG2 | 4 | u32 | Log₂ of alignment (2⁴ = 16) |
PAYLOAD_ALIGNMENT | 16 | u64 | Derived as 1 << PAYLOAD_ALIGN_LOG2 |
New Feature Flags :
arrow: Enables Apache Arrow integration viaEntryHandle::as_arrow_buffer()andinto_arrow_buffer()
Added Methods (requires arrow feature):
EntryHandle::as_arrow_buffer(&self) -> arrow_buffer::Buffer- Creates zero-copy Arrow buffer view over payload
- Requires payload alignment to satisfy Arrow’s requirements
EntryHandle::into_arrow_buffer(self) -> arrow_buffer::Buffer- Converts
EntryHandleinto Arrow buffer (consumes handle)
- Converts
Pre-Padding Calculation Algorithm :
Given:
- metadata_end: u64 // offset after EntryMetadata
- PAYLOAD_ALIGNMENT: u64 = 16
Calculate:
padding = (PAYLOAD_ALIGNMENT - (metadata_end % PAYLOAD_ALIGNMENT)) % PAYLOAD_ALIGNMENT
payload_start = metadata_end + padding
Assert:
payload_start % PAYLOAD_ALIGNMENT == 0
Technical Incompatibility Details :
0.13.x readers do not skip pre-padding bytes. When reading 0.14.x files:
- Reader expects payload immediately after metadata
- Reads pre-pad zero bytes as payload start
- Payload deserialization fails or produces corrupt data
- CRC32 checksum computed over wrong byte range
Sources : CHANGELOG.md:55-82
Migration Procedures
Migrating from 0.14.x to 0.15.x
Title : Migration Process: 0.14.x to 0.15.x
Detailed Migration Steps :
Step 1: Environment Setup
- Compile 0.14.x binary:
git checkout v0.14.0-alpha && cargo build --release - Compile 0.15.x binary:
git checkout v0.15.0-alpha && cargo build --release - Verify disk space: new file size ≈ old file size × 1.1 (due to increased padding)
- Backup:
cp data.store data.store.backup
Step 2: Extract Data with 0.14.x Binary
Using DataStore API:
Step 3: Create New Store with 0.15.x Binary
Using DataStore::create():
Step 4: Verification Pass
Check all entries are readable and valid:
Step 5: Deployment Strategy
For single-process deployments:
- Stop process
- Run migration script
- Atomic file replacement:
mv new.store data.store - Restart process with 0.15.x binary
For multi-service deployments:
- Deploy all reader services to 0.15.x first (backward compatible reads)
- Stop all writer services
- Run migration on primary data store
- Verify migrated store
- Deploy writer services to 0.15.x
- Resume writes
Sources : CHANGELOG.md:43-51
Migrating from 0.13.x to 0.14.x
Step-by-Step Migration :
Technical Changes :
- 0.13.x: No pre-padding, payload immediately follows
EntryMetadata - 0.14.x: Pre-padding inserted,
PAYLOAD_ALIGNMENT = 16guaranteed
Migration Process :
-
Data extraction (using 0.13.x binary):
-
Store creation (using 0.14.x binary):
-
Verification (using 0.14.x binary):
- Read each key and validate CRC32
- Compare payloads with original data
Service Deployment Order :
- Stage 1 : Deploy readers with 0.14.x (can read old format)
- Stage 2 : Migrate data store to new format
- Stage 3 : Deploy writers with 0.14.x
- Rationale : Prevents writers from creating 0.14.x files before readers can handle them
Sources : CHANGELOG.md:75-81
Compatibility Matrix
The following table shows version compatibility for readers and writers:
| Writer Version | Reader 0.13.x | Reader 0.14.x | Reader 0.15.x |
|---|---|---|---|
| 0.13.x | ✅ Compatible | ✅ Compatible | ✅ Compatible |
| 0.14.x | ❌ Breaks | ✅ Compatible | ✅ Compatible |
| 0.15.x | ❌ Breaks | ❌ Breaks | ✅ Compatible |
Legend :
- ✅ Compatible: Reader can correctly parse writer’s format
- ❌ Breaks: Reader cannot correctly parse writer’s format (data corruption risk)
Key Observations :
- Newer readers are backward-compatible (can read older formats)
- Older readers cannot read newer formats (forward compatibility not guaranteed)
- Each
MINORversion bump introduces a new on-disk format
Sources : CHANGELOG.md:25-82
File Format Version Detection
The storage engine does not embed a file format version marker in the data file. Version compatibility must be managed externally through:
- Deployment tracking : Maintain records of which binary version wrote each store
- File naming conventions : Include version in filename (e.g.,
data-v0.15.store) - Metadata sidecars : Store version information in separate metadata files
- Service configuration : Configure services with expected format version
Limitations :
- No automatic format detection at runtime
- Mixed-version deployment requires careful orchestration
- Checksum validation alone cannot detect version mismatches
Sources : CHANGELOG.md:1-82
Upgrade Strategies
Strategy 1: Blue-Green Deployment
Advantages :
- Clean separation of old and new versions
- Easy rollback if issues discovered
- No mixed-version complexity
Disadvantages :
- Requires duplicate infrastructure during migration
- Data must be fully copied
- Higher resource cost
Strategy 2: Rolling Upgrade (Reader-First)
Advantages :
- Minimal infrastructure duplication
- Gradual rollout reduces risk
- Reader compatibility maintained throughout
Disadvantages :
- Requires maintenance window for data migration
- More complex orchestration
- Must coordinate across multiple services
Sources : CHANGELOG.md:43-51 CHANGELOG.md:75-81
Alignment Configuration Reference
Title : Code Entity Mapping: Alignment System
Alignment Constants :
| Constant | Location | Type | Version History | Description |
|---|---|---|---|---|
PAYLOAD_ALIGN_LOG2 | src/storage_engine/constants.rs | u32 | 0.14: 4, 0.15: 6 | Log₂ of alignment (2^n) |
PAYLOAD_ALIGNMENT | src/storage_engine/constants.rs | u64 | 0.14: 16, 0.15: 64 | Computed as 1 << PAYLOAD_ALIGN_LOG2 |
Debug Assertion Functions :
| Function | Location | Signature | Behavior |
|---|---|---|---|
debug_assert_aligned() | simd-r-drive-entry-handle/src/debug_assert_aligned.rs:26-43 | fn(ptr: *const u8, align: usize) | Asserts (ptr as usize) & (align - 1) == 0 in debug/test, no-op in release |
debug_assert_aligned_offset() | simd-r-drive-entry-handle/src/debug_assert_aligned.rs:66-88 | fn(off: u64) | Asserts off.is_multiple_of(PAYLOAD_ALIGNMENT) in debug/test, no-op in release |
Function Implementation Details :
Both assertion functions use conditional compilation to ensure zero runtime cost in release builds:
Pre-Padding Calculation (used in write path):
Given:
metadata_end: u64
PAYLOAD_ALIGNMENT: u64 (16 or 64)
Compute:
padding = (PAYLOAD_ALIGNMENT - (metadata_end % PAYLOAD_ALIGNMENT)) % PAYLOAD_ALIGNMENT
payload_start = metadata_end + padding
Invariant:
payload_start % PAYLOAD_ALIGNMENT == 0
Version-Specific Alignment Values :
| Version | PAYLOAD_ALIGN_LOG2 | PAYLOAD_ALIGNMENT | Max Pre-Pad | Rationale |
|---|---|---|---|---|
| 0.13.x | N/A | N/A | 0 | No alignment guarantees |
| 0.14.x | 4 | 16 | 15 bytes | SSE compatibility (128-bit) |
| 0.15.x | 6 | 64 | 63 bytes | AVX-512 + cache-line optimization |
Sources : CHANGELOG.md:25-42 CHANGELOG.md:55-74 simd-r-drive-entry-handle/src/debug_assert_aligned.rs:1-88
CI/CD Integration for Version Management
Title : CI/CD Pipeline Steps for Version Validation
Linting Steps (from .github/workflows/rust-lint.yml:1-44):
| Step | Command | Purpose | Version Impact |
|---|---|---|---|
| Format check | cargo fmt --all -- --check | Enforces formatting consistency | Prevents style regressions |
| Clippy | cargo clippy --workspace --all-targets --all-features -- -D warnings | Static analysis for bugs and anti-patterns | Catches breaking API changes |
| Documentation | RUSTDOCFLAGS="-D warnings" cargo doc --workspace --no-deps --document-private-items | Ensures all public APIs documented | Documents version-specific changes |
| Dependency check | cargo deny check | Validates licenses and bans | Prevents supply chain issues |
| Security audit | cargo audit | Scans for CVEs in dependencies | Ensures security compliance |
Pre-Release Checklist :
Before incrementing version number in Cargo.toml:
- Run full lint suite:
cargo fmt && cargo clippy --all-features - Test all feature combinations (see CI/CD Pipeline)
- Update CHANGELOG.md:1-82 with changes:
- List breaking changes under
### Breaking - Provide migration steps under
### Migration - Document affected code entities
- List breaking changes under
- Verify backward compatibility claims
- Test migration procedure on sample data store
Testing Matrix Coverage : See CI/CD Pipeline for full matrix of OS and feature combinations tested.
Sources : .github/workflows/rust-lint.yml:1-44 CHANGELOG.md:1-16
Future Considerations
Toward 1.0 Release :
- Embed format version marker in file header
- Implement automatic format detection
- Support multi-version reader capability
- Define stable API surface with backward compatibility guarantees
Deprecation Policy (Post-1.0):
- Major version bumps for breaking changes
- Deprecated features maintained for one major version
- Clear migration paths documented before removals
Sources : CHANGELOG.md:1-5
Dismiss
Refresh this wiki
Enter email to refresh