mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2026-12-04 10:07:28 +01:00
7b7877e16fe63e260cfb19fabf7c13cecfc63ea4
Every reconciliation start and every BeginBaseInstall bumps a generation. A worker selects slices, records compare results and certifies the dirty set only while its own generation is current, so: - a worker running when a BASE install begins can no longer finish over it and clear the install guard (Base=Installing), in memory or on disk; finishReconcile also refuses while the guard is set (two independent guards); - a worker that saw its set empty, or compared a chunk, before a BASE install restarted reconciliation can neither certify the replacement run nor delete from its set. A replaced run closes its channel, and waitReconciled re-checks against the current run. Deterministic schedules (test hook at slice, compare and certify): - held worker -> BeginBaseInstall -> worker resumes: cuts stay refused as base_installing, the persisted header keeps Installing, a restart still refuses; - old worker paused at certify -> Begin/EndBaseInstall -> old resumes: the replacement stays reconciling and untouched, cuts refused; - old worker paused after a compare -> Begin/End -> old resumes: the replacement set is untouched. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Languages
Go
84.5%
Rust
7.9%
Shell
2.7%
templ
1.6%
Java
1%
Other
2%