File tree Expand file tree Collapse file tree 1 file changed +1
-6
lines changed
Expand file tree Collapse file tree 1 file changed +1
-6
lines changed Original file line number Diff line number Diff line change @@ -104,10 +104,6 @@ type Node struct {
104104 // shutting down the node.
105105 waitProp sync.WaitGroup
106106
107- // forceNewCluster is a special flag used to recover from disaster
108- // scenario by pointing to an existing or backed up data directory.
109- forceNewCluster bool
110-
111107 confState raftpb.ConfState
112108 appliedIndex uint64
113109 snapshotIndex uint64
@@ -192,7 +188,6 @@ func NewNode(ctx context.Context, opts NewNodeOptions) *Node {
192188 MaxInflightMsgs : cfg .MaxInflightMsgs ,
193189 Logger : cfg .Logger ,
194190 },
195- forceNewCluster : opts .ForceNewCluster ,
196191 stopCh : make (chan struct {}),
197192 doneCh : make (chan struct {}),
198193 removeRaftCh : make (chan struct {}),
@@ -362,7 +357,7 @@ func (n *Node) Run(ctx context.Context) error {
362357 // saveToStorage.
363358 if ! raft .IsEmptySnap (rd .Snapshot ) {
364359 // Load the snapshot data into the store
365- if err := n .restoreFromSnapshot (rd .Snapshot .Data , n . forceNewCluster ); err != nil {
360+ if err := n .restoreFromSnapshot (rd .Snapshot .Data , false ); err != nil {
366361 n .Config .Logger .Error (err )
367362 }
368363 n .appliedIndex = rd .Snapshot .Metadata .Index
You can’t perform that action at this time.
0 commit comments