Commit 890f287
committed
feat: Add configuration hot reload and MySQL failover detection
Implement zero-downtime operational resilience features:
- SIGHUP handler for runtime configuration reload without restart
- Automatic MySQL failover detection via server UUID validation
- ConnectionValidator class for comprehensive connection checks
- GTID mode verification
- Table existence validation
- Server UUID tracking and change detection
- Integration with BinlogReader for validation on connect/reconnect
- Graceful degradation: continue with current config if reload fails
- Structured logging for monitoring and alerting
Test coverage:
- Unit tests for ConnectionValidator (mock-based)
- Integration tests with real MySQL (GTID required)
- All 1200+ tests passing
Documentation:
- Bilingual operations guide (docs/{en,ja}/operations.md)
- SIGHUP usage and monitoring procedures
- Failover scenarios and troubleshooting
- Updated README_ja.md with feature descriptions
Implementation files:
- src/main.cpp: SIGHUP signal handler and config reload logic
- src/mysql/connection_validator.{h,cpp}: Validation implementation
- src/mysql/binlog_reader.{h,cpp}: UUID tracking and validation calls
- tests/mysql/connection_validator_test.cpp: Comprehensive test suite1 parent 486e88b commit 890f287
File tree
12 files changed
+2101
-1
lines changed- docs
- en
- ja
- src
- mysql
- tests/mysql
12 files changed
+2101
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
131 | 131 | | |
132 | 132 | | |
133 | 133 | | |
| 134 | + | |
| 135 | + | |
134 | 136 | | |
135 | 137 | | |
136 | 138 | | |
| |||
175 | 177 | | |
176 | 178 | | |
177 | 179 | | |
| 180 | + | |
178 | 181 | | |
179 | 182 | | |
180 | 183 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
131 | 131 | | |
132 | 132 | | |
133 | 133 | | |
| 134 | + | |
| 135 | + | |
134 | 136 | | |
135 | 137 | | |
136 | 138 | | |
| |||
175 | 177 | | |
176 | 178 | | |
177 | 179 | | |
| 180 | + | |
178 | 181 | | |
179 | 182 | | |
180 | 183 | | |
| |||
0 commit comments