migrate from boltdb to bbolt (#3554)

This commit is contained in:
Konstantin Lebedev authored and GitHub committed 2022-08-30 10:12:02 -07:00
1 parent de5263364b
commit 77098de69a
3 files changed
+12 -6

No files matched your search

+2 -2
View File
@@ -7,7 +7,7 @@ import (
"fmt"
transport "github.com/Jille/raft-grpc-transport"
"github.com/hashicorp/raft"
boltdb "github.com/hashicorp/raft-boltdb"
boltdb "github.com/hashicorp/raft-boltdb/v2"
"github.com/seaweedfs/seaweedfs/weed/glog"
"github.com/seaweedfs/seaweedfs/weed/pb"
"google.golang.org/grpc"
@@ -75,7 +75,7 @@ func (s *RaftServer) UpdatePeers() {
s.RaftHashicorp.AddVoter(
raft.ServerID(peerName), raft.ServerAddress(peer.ToGrpcAddress()), 0, 0)
}
for peer, _ := range existsPeerName {
for peer := range existsPeerName {
if _, found := s.peers[peer]; !found {
glog.V(0).Infof("removing old peer: %s", peer)
s.RaftHashicorp.RemoveServer(raft.ServerID(peer), 0, 0)