Lab: restart recovery of committed data¶
Use an isolated v4.2.5 instance with durable log/object directories. Record digest, mounts, configuration and recovery target, and confirm the deployment carries only lab data.
Committed baseline¶
DROP DATABASE IF EXISTS kernel_recovery_518;
CREATE DATABASE kernel_recovery_518;
USE kernel_recovery_518;
CREATE TABLE ledger(id INT PRIMARY KEY, amount INT);
BEGIN;
INSERT INTO ledger VALUES(1,10),(2,20);
COMMIT;
SELECT COUNT(*) AS n,SUM(amount) AS total FROM ledger;
Expected n=2,total=30. Open an uncommitted modification on another session, then restart through the deployment’s confirmed procedure while preserving logs/objects. Graceful stop/start and forced termination are separate fault strengths. A new empty container is not recovery.
After recovery¶
Wait for recovery/readiness beyond an open port; reconnect and run:
USE kernel_recovery_518;
SELECT id,amount FROM ledger ORDER BY id;
SELECT COUNT(*) AS n,SUM(amount) AS total FROM ledger;
DROP DATABASE kernel_recovery_518;
This block depends on an actual restart, so single-node CI does not execute it. Rows must remain (1,10),(2,20) and uncommitted work must be absent. Record checkpoint/LSN, stages/time and repeat the restart. Backup restore requires another destination, actual tool versions and backup data; this experiment does not establish it.
Build a separate topology using cluster deployment for CN/TN/log-replica failures. Change one condition at a time and verify reads, writes, ambiguous commits and final data separately.