aboutsummaryrefslogtreecommitdiff
path: root/weed/replication
diff options
context:
space:
mode:
authoraskeipx <askeipx@gmail.com>2022-08-24 11:18:21 +0500
committerGitHub <noreply@github.com>2022-08-23 23:18:21 -0700
commit2e78a522ab3892debf9aefeb978177678ae52a83 (patch)
tree2f10264a407fb1361c91b3f6a6e9ef06712e477a /weed/replication
parent762dc219a6175d5c81968d817d41a16fb3a1163f (diff)
downloadseaweedfs-2e78a522ab3892debf9aefeb978177678ae52a83.tar.xz
seaweedfs-2e78a522ab3892debf9aefeb978177678ae52a83.zip
remove old raft servers if they don't answer to pings for too long (#3398)
* remove old raft servers if they don't answer to pings for too long add ping durations as options rename ping fields fix some todos get masters through masterclient raft remove server from leader use raft servers to ping them CheckMastersAlive for hashicorp raft only * prepare blocking ping * pass waitForReady as param * pass waitForReady through all functions * waitForReady works * refactor * remove unneeded params * rollback unneeded changes * fix
Diffstat (limited to 'weed/replication')
-rw-r--r--weed/replication/sink/filersink/fetch_write.go5
-rw-r--r--weed/replication/source/filer_source.go2
2 files changed, 4 insertions, 3 deletions
diff --git a/weed/replication/sink/filersink/fetch_write.go b/weed/replication/sink/filersink/fetch_write.go
index d1a5d7ebd..c0321039b 100644
--- a/weed/replication/sink/filersink/fetch_write.go
+++ b/weed/replication/sink/filersink/fetch_write.go
@@ -2,9 +2,10 @@ package filersink
import (
"fmt"
- "github.com/seaweedfs/seaweedfs/weed/util"
"sync"
+ "github.com/seaweedfs/seaweedfs/weed/util"
+
"google.golang.org/grpc"
"github.com/seaweedfs/seaweedfs/weed/glog"
@@ -113,7 +114,7 @@ func (fs *FilerSink) WithFilerClient(streamingMode bool, fn func(filer_pb.Seawee
return pb.WithGrpcClient(streamingMode, func(grpcConnection *grpc.ClientConn) error {
client := filer_pb.NewSeaweedFilerClient(grpcConnection)
return fn(client)
- }, fs.grpcAddress, fs.grpcDialOption)
+ }, fs.grpcAddress, false, fs.grpcDialOption)
}
diff --git a/weed/replication/source/filer_source.go b/weed/replication/source/filer_source.go
index 6c69b735c..2da883ba6 100644
--- a/weed/replication/source/filer_source.go
+++ b/weed/replication/source/filer_source.go
@@ -131,7 +131,7 @@ func (fs *FilerSource) WithFilerClient(streamingMode bool, fn func(filer_pb.Seaw
return pb.WithGrpcClient(streamingMode, func(grpcConnection *grpc.ClientConn) error {
client := filer_pb.NewSeaweedFilerClient(grpcConnection)
return fn(client)
- }, fs.grpcAddress, fs.grpcDialOption)
+ }, fs.grpcAddress, false, fs.grpcDialOption)
}