Skip to content

SeaweedFS is a distributed storage system for object storage (S3), file systems, Iceberg table buckets, and Lance vector buckets, designed to handle billions of files with O(1) disk access and effortless horizontal scaling.

update raft version

chrislud999f1f0e2a1
diff --git a/go.mod b/go.mod
index 39d8aea6ea..252f208b30 100644
--- a/go.mod
+++ b/go.mod
@@ -84,7 +84,7 @@ require (
github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475 // indirect
github.com/remyoudompheng/bigfft v0.0.0-20230129092748-24d4a6f8daec // indirect
github.com/seaweedfs/goexif v1.0.3
- github.com/seaweedfs/raft v1.1.2
+ github.com/seaweedfs/raft v1.1.3
github.com/sirupsen/logrus v1.9.0 // indirect
github.com/spf13/afero v1.9.3 // indirect
github.com/spf13/cast v1.5.0 // indirect
diff --git a/weed/server/raft_server.go b/weed/server/raft_server.go
index 16736eb5b6..d718ecac72 100644
--- a/weed/server/raft_server.go
+++ b/weed/server/raft_server.go
@@ -3,7 +3,6 @@ package weed_server
import (
"encoding/json"
transport "github.com/Jille/raft-grpc-transport"
- "github.com/seaweedfs/raft/protobuf"
"io"
"math/rand"
"os"
@@ -34,8 +33,6 @@ type RaftServerOption struct {
}
type RaftServer struct {
- protobuf.UnimplementedRaftServer
- raftGrpcServer *raft.GrpcServer
peers map[string]pb.ServerAddress // initial peers to join with
raftServer raft.Server
RaftHashicorp *hashicorpRaft.Raft
@@ -43,6 +40,7 @@ type RaftServer struct {
dataDir string
serverAddr pb.ServerAddress
topo *topology.Topology
+ *raft.GrpcServer
}
type StateMachine struct {
@@ -164,7 +162,7 @@ func NewRaftServer(option *RaftServerOption) (*RaftServer, error) {
}
}
- s.raftGrpcServer = raft.NewGrpcServer(s.raftServer)
+ s.GrpcServer = raft.NewGrpcServer(s.raftServer)
glog.V(0).Infof("current cluster leader: %v", s.raftServer.Leader())