fix(mysql): wait for SQL before PITR replay#2650
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## release-1.0 #2650 +/- ##
===========================================
Coverage 0.00% 0.00%
===========================================
Files 61 61
Lines 6506 6506
===========================================
Misses 6506 6506 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
Runtime validation update (idc4): Scope:
Result:
Runner boundary:
Evidence:
Boundary: this is one scoped validation run, not release-ready and not broad version coverage. |
|
Runtime validation update (idc4, N=3 scoped): Scope:
Valid product-path runs:
Excluded from fix conclusion:
Environment cleanup/restoration:
Boundary: this is N=3 scoped validation for idc4 / MySQL 5.7.44 / PITR multifile with syncer PR #160 patch. It is not release-ready and not cross-version coverage. Successful runs still did not preserve the PostReady job container log line for |
What
Add a bounded SQL readiness wait before MySQL PITR postReady binlog replay starts.
The replay script now:
${DP_DB_HOST}:${DP_DB_PORT}withmysql ... -e "SELECT 1"before creating/var/lib/mysql/pitr-logs;${DP_DB_PORT}in the actualWALG_MYSQL_BINLOG_REPLAY_COMMAND.Why
idc4 MySQL 5.7.44 PITR multifile N=1 with syncer PR #160 patch crossed the previous DCS/role blocker, but PostReady still failed:
role=primary;2026-05-19T08:45:52Z;2026-05-19T08:45:53ZwithERROR 2003 ... Can't connect to MySQL server ... :3306 (111);/var/lib/mysql/pitr-logshad already been created by the first failed attempt.This patch prevents the observed pre-SQL-ready replay start. It keeps the existing
pitr-logsguard fail-closed instead of blindly deleting the directory, because a directory left after replay has started may mean binlogs were partially applied.Validation
Static:
bash -n addons/mysql/dataprotection/mysql-pitr-restore.shpassed.helm template mysql addons/mysql --namespace kb-systempassed.Runtime evidence before this patch:
evidence/mysql-tests-idc4-5.7-pitr-multifile-pr160-patch-20260519T084326Z/ed3fe8ec829717f8be0588c24ca962c9eac1e1553135c4cfabba7b06ff6ec90cBoundary
This is a candidate fix for the observed MySQL addon ActionSet readiness race. It is not release-ready and not yet a proven PITR fix. Patch-image runtime validation still needs to prove:
wal-g binlog-replayresult;row_count=8for the PITR window;