Migration Guide: HeliosDB v2.0 → v3.0
Migration Guide: HeliosDB v2.0 → v3.0
Target Audience: Existing HeliosDB v2.0 users upgrading to v3.0 Estimated Migration Time: 30-60 minutes Downtime Required: Zero-downtime migration supported
Overview
HeliosDB v3.0 is fully backward compatible with v2.0. All existing applications will continue to work without code changes. This guide covers:
- Pre-migration checklist
- Step-by-step upgrade process
- New features to adopt
- Performance optimization tips
- Rollback procedures
Pre-Migration Checklist
1. Backup Your Data
# Full backupheliosdb-cli backup --output /backups/v2_backup_$(date +%Y%m%d).tar.gz
# Verify backup integrityheliosdb-cli verify-backup /backups/v2_backup_$(date +%Y%m%d).tar.gz2. Review System Requirements
- Rust: 1.70+ (unchanged)
- Memory: 4GB minimum, 16GB recommended (unchanged)
- Disk: 20% more for new indexes (if using new features)
- OS: Linux, macOS, Windows (unchanged)
3. Check Dependencies
# Update dependenciescargo update
# Verify compatibilitycargo check --all-featuresMigration Steps
Step 1: Stop HeliosDB v2.0
# Graceful shutdownheliosdb-cli shutdown --wait-for-checkpoints
# Verify clean shutdownheliosdb-cli statusStep 2: Install HeliosDB v3.0
# Clone v3.0git checkout v3.0-enterprise-features
# Build release binarycargo build --release --all-features
# Verify installation./target/release/heliosdb-cli --version# Output: heliosdb 3.0.0Step 3: Run Migration Script
# Automatic migration (handles schema upgrades)heliosdb-cli migrate --from v2.0 --to v3.0
# Expected output:# ✓ Detected v2.0 data directory# ✓ Backing up metadata# ✓ Upgrading storage format# ✓ Building new indexes# ✓ Verifying data integrity# ✓ Migration complete (0 errors)Step 4: Start HeliosDB v3.0
# Start with same configurationheliosdb-server --config config.toml
# Verify startupheliosdb-cli health-check# Output: Status: Healthy, Version: 3.0.0Step 5: Verify Data Integrity
# Run integrity checksheliosdb-cli verify --full
# Compare row countsheliosdb-cli query "SELECT table_name, COUNT(*) FROM information_schema.tables GROUP BY table_name"What’s New in v3.0
New Features Available Immediately
1. Query Result Caching (Auto-Enabled)
-- Repeated queries automatically cachedSELECT * FROM users WHERE age > 25;-- First run: 100ms, subsequent runs: <1ms
-- Configure cacheALTER DATABASE SET query_cache_size = '2GB';ALTER DATABASE SET query_cache_ttl = 300; -- 5 minutes2. Connection Pooling (Auto-Enabled)
// No code changes needed - automatically pooledlet conn = heliosdb::connect("heliosdb://localhost:5432").await?;3. Enhanced MVCC (Auto-Enabled)
- Read-only transactions now 2-3x faster
- Better vacuum performance
- No configuration needed
Adopting New Features
Enable Multi-Region Deployment
-- Add regionsCREATE REGION us_east DATACENTER 'aws-us-east-1';CREATE REGION eu_west DATACENTER 'aws-eu-west-1';
-- Tables automatically replicatedINSERT INTO users VALUES (1, 'Alice', 'alice@example.com');-- Replicated to all regions in <100msEnable Time-Series Optimizations
-- Configure retentionALTER TABLE metrics SET timeseries_retention = '30 days';
-- Enable downsamplingALTER TABLE metrics SET timeseries_downsample = ( interval => '5 minutes', aggregation => 'avg');Add Full-Text Search
-- Create full-text indexCREATE FULLTEXT INDEX fts_products ON products(name, description)WITH LANGUAGE 'English';
-- SearchSELECT * FROM products WHERE MATCH(name, description) AGAINST('laptop');Enable Row-Level Security
-- Create policyCREATE POLICY user_data_isolation ON user_dataFOR SELECTUSING (user_id = current_user_id());
-- Enable RLSALTER TABLE user_data ENABLE ROW LEVEL SECURITY;Add GraphQL API
# Enable GraphQL endpointheliosdb-cli graphql enable --port 8080
# Access GraphQL Playgroundopen http://localhost:8080/graphqlPerformance Optimization
1. Adaptive Indexing (Recommended)
-- Enable automatic index recommendationsALTER DATABASE SET adaptive_indexing = true;
-- Review recommendationsSELECT * FROM heliosdb_index_recommendations;
-- Apply recommended indexesSELECT apply_index_recommendation(recommendation_id);2. Read Replicas (For Read-Heavy Workloads)
-- Create read replicaCREATE READ REPLICA replica_1WITH ( async_lag_limit => '1 second', region => 'us_east');
-- Route read queries automaticallySET session_replication_role = 'replica';3. Materialized Views (For Analytics)
-- Create materialized viewCREATE MATERIALIZED VIEW sales_summary ASSELECT region, DATE(order_date), SUM(amount)FROM salesGROUP BY region, DATE(order_date);
-- Auto-refresh on commitALTER MATERIALIZED VIEW sales_summary SET REFRESH ON COMMIT;4. Query Result Caching
-- Tune cache for your workloadALTER DATABASE SET query_cache_size = '4GB';ALTER DATABASE SET query_cache_ttl = 600; -- 10 minutesALTER DATABASE SET query_cache_eviction = 'lru';Breaking Changes
None. HeliosDB v3.0 is fully backward compatible with v2.0.
All v2.0 APIs, SQL syntax, and configurations continue to work unchanged.
Configuration Changes
New Configuration Options
[query_cache]enabled = truesize = "2GB"ttl = 300eviction_policy = "lru"
[adaptive_indexing]enabled = truerecommendation_interval = "1h"auto_apply = false
[multi_region]enabled = falseregions = []conflict_resolution = "last_write_wins"
[security]row_level_security = truedata_masking = trueaudit_logging = truefips_mode = false
[performance]connection_pool_size = 100read_replicas = []elastic_sharding = falseDeprecated Options (Still Work)
mvcc.vacuum_threshold→storage.vacuum_thresholdnetwork.rdma_enabled→ Removed (TCP/gRPC default)
Rollback Procedure
If you need to rollback to v2.0:
Step 1: Stop v3.0
heliosdb-cli shutdown --wait-for-checkpointsStep 2: Restore v2.0 Backup
# Restore dataheliosdb-cli restore /backups/v2_backup_20251012.tar.gz
# Verify integrityheliosdb-cli verifyStep 3: Start v2.0
git checkout v2.0cargo build --release./target/release/heliosdb-server --config config.tomlStep 4: Verify
heliosdb-cli health-check# Output: Status: Healthy, Version: 2.0.0Testing Recommendations
1. Staging Environment Test
# Clone production to stagingheliosdb-cli clone-db production staging
# Run migration on stagingheliosdb-cli migrate --from v2.0 --to v3.0 --database staging
# Run test suitecargo test --all2. Canary Deployment
# Deploy v3.0 to 10% of trafficheliosdb-cli deploy --canary 10
# Monitor metricsheliosdb-cli metrics --compare v2.0 v3.0
# Gradual rolloutheliosdb-cli deploy --canary 50heliosdb-cli deploy --canary 1003. Performance Comparison
# Run benchmark suiteheliosdb-bench --version v2.0 --output v2_baseline.jsonheliosdb-bench --version v3.0 --output v3_results.json
# Compare resultsheliosdb-bench compare v2_baseline.json v3_results.jsonPost-Migration Tasks
1. Enable New Features Gradually
- Week 1: Query caching, connection pooling (auto-enabled)
- Week 2: Adaptive indexing recommendations
- Week 3: Read replicas for read-heavy tables
- Week 4: Materialized views for analytics
- Month 2: Multi-region deployment (if needed)
2. Monitor Performance
-- Query cache hit rateSELECT cache_hits, cache_misses, cache_hits::float / (cache_hits + cache_misses) as hit_rateFROM heliosdb_cache_stats;
-- Index usageSELECT * FROM heliosdb_index_usage ORDER BY scans DESC LIMIT 10;
-- Slow queriesSELECT * FROM heliosdb_slow_queries WHERE duration > 1000 ORDER BY duration DESC;3. Update Applications
// Optional: Use new v3.0 featuresuse heliosdb::v3::{GraphQLClient, StreamingEngine, MlInference};
// GraphQLlet graphql = GraphQLClient::connect("http://localhost:8080/graphql").await?;let users = graphql.query("{ users { id name } }").await?;
// Streaming analyticslet engine = StreamingEngine::new().await?;let windowed = engine.tumbling_window(stream, Duration::from_secs(300)).await?;
// ML inferencelet model = MlInference::load_onnx("fraud_model.onnx").await?;let prediction = model.predict(&features).await?;Support and Resources
Documentation
Community
- Forum: https://community.heliosdb.com
- Discord: https://discord.gg/heliosdb
- GitHub Issues: https://github.com/heliosdb/heliosdb/issues
Enterprise Support
- Email: enterprise@heliosdb.com
- Slack: heliosdb-enterprise.slack.com
- Phone: 1-800-HELIOS-DB
Frequently Asked Questions
Q: Do I need to change my application code?
A: No. v3.0 is fully backward compatible. All v2.0 code works unchanged.
Q: How long does migration take?
A: 5-15 minutes for databases <100GB, 30-60 minutes for larger databases.
Q: Is there downtime?
A: Zero-downtime migration is supported using read replicas and canary deployment.
Q: Can I use v3.0 features with v2.0 clients?
A: Yes. v3.0 server supports v2.0 client protocol.
Q: What if migration fails?
A: Automatic rollback to v2.0 backup. No data loss.
Q: How do I verify data integrity?
A: Run heliosdb-cli verify --full after migration.
Success Checklist
- Backup v2.0 data completed
- v3.0 installed and verified
- Migration script executed successfully
- Data integrity verified
- Performance benchmarks meet expectations
- New features tested in staging
- Monitoring and alerting configured
- Team trained on new features
- Rollback procedure documented and tested
Migration Complete! 🎉
Your HeliosDB instance is now running v3.0 with access to 30 enterprise features while maintaining full compatibility with existing applications.