Skip to content

Commit c9d06e9

Browse files
committed
Fix the '--force-new-cluster' can't clean up learners issue
Signed-off-by: Benjamin Wang <benjamin.ahrtr@gmail.com>
1 parent 2737581 commit c9d06e9

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

server/storage/util.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,9 @@ func GetEffectiveNodeIDsFromWALEntries(lg *zap.Logger, snap *raftpb.Snapshot, en
121121
for _, id := range snap.Metadata.ConfState.Voters {
122122
ids[id] = true
123123
}
124+
for _, id := range snap.Metadata.ConfState.Learners {
125+
ids[id] = true
126+
}
124127
}
125128
for _, e := range ents {
126129
if e.Type != raftpb.EntryConfChange {

0 commit comments

Comments
 (0)