fix: persist mount metadata across master switch#650
fix: persist mount metadata across master switch#650jlon wants to merge 3 commits intoCurvineIO:mainfrom
Conversation
|
Additional note for this PR update (commit: d340099): Why this changeAfter fixing the mount-loss issue, we also need clear diagnostics for What was addedFile:
Behavioral scope
Validation
|
| if total == 0 { | ||
| info!("mount restore completed: no entries found"); | ||
| return; | ||
| } |
There was a problem hiding this comment.
else {
info!(
"mount restore started: {} entries loaded from metadata store",
total
);
}
There was a problem hiding this comment.
Keeping this outside else is intentional. We want a clear restore lifecycle log even when metadata load succeeds with zero entries, so operators can distinguish "restore executed and found 0 mounts" from "restore never ran".
There was a problem hiding this comment.
Updated in 0b5a30e. The start log now runs only when total > 0, so the empty-table path emits only a single completion line.
| }; | ||
|
|
||
| let total = mounts.len(); | ||
| info!( |
There was a problem hiding this comment.
total is kept to support restore observability and summary correlation. It is used to report how many entries were loaded from metadata before per-entry restore, which helps diagnose partial-restore cases.
There was a problem hiding this comment.
Updated in 0b5a30e. Removed redundant temp vars in the restore loop and simplified logging flow.
| for mnt in mounts { | ||
| let mount_id = mnt.mount_id; | ||
| let cv_path = mnt.cv_path.clone(); | ||
| let ufs_path = mnt.ufs_path.clone(); |
There was a problem hiding this comment.
Deleting the three lines above only prints in the logs, so it's unnecessary.
There was a problem hiding this comment.
I am keeping these logs on purpose. They provide low-cost but important startup visibility for master failover: load success/failure, empty-table case, and restore progress are distinct states in production troubleshooting.
There was a problem hiding this comment.
Updated in 0b5a30e. Empty restore now logs once (no entries found) and avoids duplicate-looking startup lines.
0b5a30e to
3fba9dd
Compare
Summary
Verification