Browse Source

gRpc connection error on filer when no volume left #2243

fix https://github.com/chrislusf/seaweedfs/issues/2243

grpc do not cache connections only when connection problem happens.
Normal error results should not close the shared grpc connection.
pull/2274/head
Chris Lu 3 years ago
parent
commit
4909bd9684
  1. 4
      weed/pb/grpc_client_server.go

4
weed/pb/grpc_client_server.go

@ -119,9 +119,7 @@ func WithCachedGrpcClient(fn func(*grpc.ClientConn) error, address string, opts
}
executionErr := fn(vgc.ClientConn)
if executionErr != nil {
vgc.errCount++
if vgc.errCount > 3 ||
strings.Contains(executionErr.Error(), "transport") ||
if strings.Contains(executionErr.Error(), grpc.ErrServerStopped) ||
strings.Contains(executionErr.Error(), "connection closed") {
grpcClientsLock.Lock()
if t, ok := grpcClients[address]; ok {

Loading…
Cancel
Save