Skip to content

v2.7.1

Choose a tag to compare

@maxpert maxpert released this 25 Jan 01:20
· 748 commits to master since this release

Highlights

This release brings major performance improvements, enhanced replica capabilities with transparent failover, and significant telemetry enhancements for production observability.

🚀 New Features

Replica Enhancements

  • Transparent Failover: Read-only replicas now automatically failover between cluster nodes when disconnected
  • Cluster Discovery: Replicas can discover new cluster nodes dynamically
  • Per-Database Snapshots: Support for snapshotting individual databases instead of full cluster state
  • TxnID-Ordered Streaming: Ensures replica correctness during failover scenarios

Performance & Compression

  • Zstd Compression: Added zstd compression for gRPC cluster communication (configurable compression level)
  • Deferred CDC Payload: CDC data now deferred from PREPARE to COMMIT phase, reducing network overhead
  • Binary Intent Key Encoding: More efficient storage format for transaction intents

Telemetry & Observability

  • Comprehensive Prometheus metrics improvements
  • Better gap detection and reporting
  • Enhanced logging for debugging replication issues

SQLite Enhancements

  • Session-Level Transpilation Toggle: Control MySQL-to-SQLite transpilation per session
  • SQLite Extension Loading: Support for loading SQLite extensions at runtime
  • Time-Limited Incremental Vacuum: Automatic WAL checkpoint with configurable vacuum duration
  • Unix Socket Support: MySQL server can now listen on Unix sockets

DML Determinism Detection

  • Automatic detection of non-deterministic DML statements
  • Warnings for statements that may produce different results across nodes

⚡ Performance Improvements

  • In-Memory Intent Tracking: Replaced Pebble-based intent locks with in-memory RowLockStore for faster conflict detection
  • Optimized Commit Path: Removed redundant validation, added DDL flush barriers
  • Eliminated O(N) Random Seeks: New intent storage schema with efficient key layout
  • Batched CDC Application: CDC entries wrapped in single SQLite transaction
  • Consolidated Pebble Key-Building: Generic helpers reduce code duplication and improve performance

🐛 Bug Fixes

  • Replica Snapshot Verification: Fixed mismatch where __marmot_system was included in verification list but not sent (replicas maintain their own system DB)
  • UPSERT Replication: Fixed CDC type override breaking UPSERT operations
  • Startup Deadlock: Fixed deadlock in wireGCCoordination during node startup
  • GC/Anti-Entropy Interval: Enforced GC interval >= anti-entropy interval to prevent stale watermark decisions

🧹 Code Quality

  • Migrated from deprecated grpc.DialContext to grpc.NewClient
  • Removed 250+ lines of dead code and unused dependencies
  • Updated outdated dependencies
  • Cleaned up unused config fields and parameters

📖 Documentation

  • Updated README with new replica failover configuration
  • Added per-database snapshot configuration docs
  • Improved example scripts with auto-generated configs and PSK authentication

Breaking Changes

None - this release is backward compatible with v2.4.x configurations.

Upgrade Notes

  1. Replica Users: Existing replicas will automatically benefit from the snapshot fix
  2. Compression: To enable zstd compression, set compression_level in [grpc_client] config (0=disabled, 1=fastest, 4=best)
  3. Vacuum: Configure vacuum_time_limit_seconds in [replication] to control incremental vacuum duration