|
| 1 | +# MygramDB v1.2.4 Release Notes |
| 2 | + |
| 3 | +**Release Date:** 2025-11-21 |
| 4 | +**Type:** Patch Release (Critical Bug Fix) |
| 5 | + |
| 6 | +--- |
| 7 | + |
| 8 | +## Overview |
| 9 | + |
| 10 | +Version 1.2.4 is a critical patch release that fixes a GTID parsing crash affecting systems with multiple MySQL replication sources. This issue was discovered in production environments running MySQL 8.4 with complex replication topologies. The release also includes a fix for RPM package upgrade errors. |
| 11 | + |
| 12 | +## Critical Fixes |
| 13 | + |
| 14 | +### 1. GTID Parsing Crash (MySQL 8.4 Compatibility) |
| 15 | + |
| 16 | +**Problem:** MygramDB would crash with `std::invalid_argument` during replication startup when receiving GTID strings from MySQL 8.4 servers with multiple replication sources. |
| 17 | + |
| 18 | +**Root Cause:** |
| 19 | +- MySQL 8.4's GTID formatting includes embedded newlines for readability when multiple UUIDs are present |
| 20 | +- Format: `uuid1:1-100,\nuuid2:1-200,\nuuid3:1-300` (comma followed by newline) |
| 21 | +- This is MySQL's official behavior defined in `default_string_format` with `",\n"` as the UUID separator |
| 22 | +- Long GTID strings (6+ UUIDs from multiple replication sources) would cause parsing failures |
| 23 | + |
| 24 | +**Solution:** |
| 25 | +- GTID strings are now normalized by removing all whitespace characters (newlines, spaces, tabs) |
| 26 | +- Implementation follows MySQL's official parser behavior (`SKIP_WHITESPACE()` macro) |
| 27 | +- Compatible with both single and multi-source replication topologies |
| 28 | + |
| 29 | +**Affected Scenarios:** |
| 30 | +- Systems replicating from multiple MySQL sources |
| 31 | +- MySQL 8.4 servers with long GTID execution sets |
| 32 | +- Production environments observed with 6 UUIDs (292 characters, 5 newlines) |
| 33 | + |
| 34 | +**Example GTID Format:** |
| 35 | + |
| 36 | +``` |
| 37 | +Original (from MySQL): |
| 38 | +023cdb62-8398-11ee-9327-4a0008d26241:1-8178383, |
| 39 | +ba13f0ad-f09a-11e8-b079-b2869295776e:1-183978832, |
| 40 | +cf65e299-d4d1-11ec-9b58-caab0c3eeec8:1-107084115 |
| 41 | +
|
| 42 | +Normalized (by MygramDB): |
| 43 | +023cdb62-8398-11ee-9327-4a0008d26241:1-8178383,ba13f0ad-f09a-11e8-b079-b2869295776e:1-183978832,cf65e299-d4d1-11ec-9b58-caab0c3eeec8:1-107084115 |
| 44 | +``` |
| 45 | + |
| 46 | +**Technical Details:** |
| 47 | +- Modified: `src/storage/snapshot_builder.cpp` |
| 48 | +- Uses `std::remove_if` with `std::isspace` for whitespace removal |
| 49 | +- Applied immediately after GTID retrieval from MySQL |
| 50 | +- Zero performance impact (one-time operation during snapshot) |
| 51 | + |
| 52 | +### 2. RPM Package Upgrade Failures |
| 53 | + |
| 54 | +**Problem:** RPM package upgrades would fail with "fg: no job control" error during the preun scriptlet execution. |
| 55 | + |
| 56 | +**Solution:** |
| 57 | +- Added error suppression to `%systemd_preun` macro in RPM spec |
| 58 | +- Syntax: `%systemd_preun %{name}.service || :` |
| 59 | +- Ensures smooth package updates without manual intervention |
| 60 | + |
| 61 | +**Benefits:** |
| 62 | +- Eliminates upgrade failures on production systems |
| 63 | +- No service interruption during package updates |
| 64 | +- Compatible with all supported Linux distributions |
| 65 | + |
| 66 | +## Testing |
| 67 | + |
| 68 | +### New Test Coverage |
| 69 | + |
| 70 | +Added comprehensive GTID whitespace handling tests (`tests/integration/server/gtid_dump_test.cpp`): |
| 71 | + |
| 72 | +**Test Cases:** |
| 73 | +1. Single UUID with trailing newlines |
| 74 | +2. Multiple UUIDs with newlines after commas (MySQL 8.4 format) |
| 75 | +3. Real-world 6-UUID production scenario |
| 76 | +4. Mixed whitespace (spaces, tabs, newlines) |
| 77 | +5. Leading and trailing whitespace |
| 78 | + |
| 79 | +**Validation:** |
| 80 | +- All 13 GTID integration tests passing |
| 81 | +- Verified against MySQL 8.4.7 behavior |
| 82 | +- Tested with production-scale GTID strings (292 characters) |
| 83 | + |
| 84 | +## Migration Guide |
| 85 | + |
| 86 | +### From v1.2.3 |
| 87 | + |
| 88 | +**No configuration changes required.** This is a transparent bug fix release. |
| 89 | + |
| 90 | +**Upgrade Steps:** |
| 91 | + |
| 92 | +**Docker users:** |
| 93 | + |
| 94 | +```bash |
| 95 | +# Pull the new image |
| 96 | +docker pull ghcr.io/libraz/mygram-db:v1.2.4 |
| 97 | + |
| 98 | +# Or update docker-compose.yml |
| 99 | +services: |
| 100 | + mygramdb: |
| 101 | + image: ghcr.io/libraz/mygram-db:v1.2.4 |
| 102 | +``` |
| 103 | + |
| 104 | +**RPM users:** |
| 105 | + |
| 106 | +```bash |
| 107 | +# Download and install new RPM |
| 108 | +sudo rpm -Uvh mygramdb-1.2.4-1.el9.x86_64.rpm |
| 109 | +``` |
| 110 | + |
| 111 | +**Source build:** |
| 112 | + |
| 113 | +```bash |
| 114 | +git checkout v1.2.4 |
| 115 | +cmake -B build -DCMAKE_BUILD_TYPE=Release |
| 116 | +cmake --build build --parallel |
| 117 | +``` |
| 118 | + |
| 119 | +### Rollback Procedure |
| 120 | + |
| 121 | +If issues arise, rollback is straightforward: |
| 122 | + |
| 123 | +```bash |
| 124 | +# Docker |
| 125 | +docker pull ghcr.io/libraz/mygram-db:v1.2.3 |
| 126 | + |
| 127 | +# RPM |
| 128 | +sudo rpm -Uvh --oldpackage mygramdb-1.2.3-1.el9.x86_64.rpm |
| 129 | +``` |
| 130 | + |
| 131 | +## Compatibility |
| 132 | + |
| 133 | +**MySQL Versions:** |
| 134 | +- MySQL 8.0.x ✓ |
| 135 | +- MySQL 8.4.x ✓ (now fully compatible) |
| 136 | +- MariaDB 10.x ✓ |
| 137 | + |
| 138 | +**Operating Systems:** |
| 139 | +- Linux (all major distributions) |
| 140 | +- macOS (development/testing) |
| 141 | + |
| 142 | +**Breaking Changes:** None |
| 143 | + |
| 144 | +**Deprecated Features:** None |
| 145 | + |
| 146 | +## Performance Impact |
| 147 | + |
| 148 | +**Zero performance impact:** |
| 149 | +- GTID normalization is a one-time operation during snapshot |
| 150 | +- No changes to query execution or binlog processing |
| 151 | +- No additional memory allocation |
| 152 | + |
| 153 | +## Known Issues |
| 154 | + |
| 155 | +None. |
| 156 | + |
| 157 | +## Upgrade Recommendation |
| 158 | + |
| 159 | +**Priority:** High for production systems using: |
| 160 | +- MySQL 8.4 |
| 161 | +- Multi-source replication |
| 162 | +- RPM-based deployments |
| 163 | + |
| 164 | +**Priority:** Low for: |
| 165 | +- Single-source replication setups |
| 166 | +- MySQL 8.0 without multi-source replication |
| 167 | + |
| 168 | +## Contributors |
| 169 | + |
| 170 | +- @libraz |
| 171 | + |
| 172 | +## Links |
| 173 | + |
| 174 | +- [Full Changelog](https://github.com/libraz/mygram-db/compare/v1.2.3...v1.2.4) |
| 175 | +- [Docker Image](https://github.com/libraz/mygram-db/pkgs/container/mygram-db) |
| 176 | +- [Configuration Reference](../en/configuration.md) |
| 177 | +- [Replication Guide](../en/replication.md) |
| 178 | + |
| 179 | +--- |
| 180 | + |
| 181 | +**Questions or Issues?** |
| 182 | +Please open an issue on [GitHub Issues](https://github.com/libraz/mygram-db/issues) |
0 commit comments