start the protobuf server after raft has initialized
Otherwise, we may get a protobuf request to write data to the local shards which don't exist yetpull/429/head
parent
69c19018e2
commit
e3c55bd6a6
|
@ -75,8 +75,6 @@ func NewServer(config *configuration.Configuration) (*Server, error) {
|
|||
}
|
||||
|
||||
func (self *Server) ListenAndServe() error {
|
||||
go self.ProtobufServer.ListenAndServe()
|
||||
|
||||
err := self.RaftServer.ListenAndServe()
|
||||
if err != nil {
|
||||
return err
|
||||
|
@ -88,6 +86,8 @@ func (self *Server) ListenAndServe() error {
|
|||
|
||||
time.Sleep(5 * time.Second)
|
||||
|
||||
go self.ProtobufServer.ListenAndServe()
|
||||
|
||||
log.Info("Recovering from log...")
|
||||
err = self.ClusterConfig.RecoverFromWAL()
|
||||
if err != nil {
|
||||
|
|
Loading…
Reference in New Issue