You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
LogService HAKeeper can regress to stale shard membership after Dragonboat imported snapshot metadata rewrite #24966
A production LogService incident on June 4 exposed a Dragonboat snapshot import metadata bug that can make HAKeeper observe a stale shard membership as a newer view.
When Dragonboat imported a snapshot, the imported snapshot metadata could use the snapshot index as Membership.ConfigChangeId. MatrixOne maps Dragonboat membership ConfigChangeId to the LogService shard epoch visible to HAKeeper. If an old membership is imported with a large snapshot index, HAKeeper can treat that stale membership as the latest shard view.
In the observed incident, this allowed HAKeeper to schedule membership changes from an obsolete view and attempt to replace the live LogService replica, creating a split membership state.
Root cause
Dragonboat's snapshot import path mixed two different concepts:
snapshot index: the raft log index represented by the snapshot data
membership config-change id: the raft entry index of the latest applied membership change
The imported snapshot path must not synthesize Membership.ConfigChangeId from the snapshot index. For online imports, it must preserve the source snapshot membership consistently and reject invalid target membership before restore.
Go module resolution for the updated Dragonboat replacement
A focused LogService or dependency compile/test target where practical
Related incident context
This issue tracks the dependency uptake needed to prevent recurrence of the June 4 LogService/HAKeeper stale-membership incident. It does not attempt to repair already-corrupted cluster metadata; that should be handled by a separate recovery/remediation task if needed.
Activity
fix logservice stale replica truncation for main (#24983)
fix logservice stale replica truncation for main (matrixorigin#24983)
fix logservice stale replica truncation for 4.0 (#24983) (#25050)
logservice: support offline WAL recovery (#25867)
fix logservice stale replica truncation for main (matrixorigin#24983)
logservice: support offline WAL recovery (matrixorigin#25867)
fix logservice stale replica truncation for main (matrixorigin#24983)
logservice: support offline WAL recovery (matrixorigin#25867)
fix logservice stale replica truncation for main (matrixorigin#24983)
logservice: support offline WAL recovery (matrixorigin#25867)