Browse Source

minor

pull/4898/head
chrislu 1 year ago
parent
commit
4e493d596c
  1. 6
      weed/s3api/s3api_circuit_breaker.go

6
weed/s3api/s3api_circuit_breaker.go

@ -30,6 +30,10 @@ func NewCircuitBreaker(option *S3ApiServerOption) *CircuitBreaker {
err := pb.WithFilerClient(false, 0, option.Filer, option.GrpcDialOption, func(client filer_pb.SeaweedFilerClient) error { err := pb.WithFilerClient(false, 0, option.Filer, option.GrpcDialOption, func(client filer_pb.SeaweedFilerClient) error {
content, err := filer.ReadInsideFiler(client, s3_constants.CircuitBreakerConfigDir, s3_constants.CircuitBreakerConfigFile) content, err := filer.ReadInsideFiler(client, s3_constants.CircuitBreakerConfigDir, s3_constants.CircuitBreakerConfigFile)
if err == filer_pb.ErrNotFound {
glog.Infof("s3 circuit breaker not configured")
return nil
}
if err != nil { if err != nil {
return fmt.Errorf("read S3 circuit breaker config: %v", err) return fmt.Errorf("read S3 circuit breaker config: %v", err)
} }
@ -37,7 +41,7 @@ func NewCircuitBreaker(option *S3ApiServerOption) *CircuitBreaker {
}) })
if err != nil { if err != nil {
glog.Infof("s3 circuit breaker not configured: %v", err)
glog.Infof("s3 circuit breaker not configured correctly: %v", err)
} }
return cb return cb

Loading…
Cancel
Save