Skip to content

Commit e96b529

Browse files
authored
Update failure detect default time (#3940)
Update failure detect defaut time
1 parent 85c4381 commit e96b529

File tree

2 files changed

+7
-8
lines changed

2 files changed

+7
-8
lines changed

common/dynamicconfig/constants.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -202,8 +202,8 @@ const (
202202
FrontendThrottledLogRPS = "frontend.throttledLogRPS"
203203
// FrontendShutdownDrainDuration is the duration of traffic drain during shutdown
204204
FrontendShutdownDrainDuration = "frontend.shutdownDrainDuration"
205-
// FrontendShutdownFailHealthcheckDuration is the duration of shutdown failure detection
206-
FrontendShutdownFailHealthcheckDuration = "frontend.shutdownFailHealthcheckDuration"
205+
// FrontendShutdownFailHealthCheckDuration is the duration of shutdown failure detection
206+
FrontendShutdownFailHealthCheckDuration = "frontend.shutdownFailHealthCheckDuration"
207207
// FrontendMaxBadBinaries is the max number of bad binaries in namespace config
208208
FrontendMaxBadBinaries = "frontend.maxBadBinaries"
209209
// SendRawWorkflowHistory is whether to enable raw history retrieving

service/frontend/service.go

+5-6
Original file line numberDiff line numberDiff line change
@@ -31,14 +31,13 @@ import (
3131
"sync/atomic"
3232
"time"
3333

34+
"go.temporal.io/api/operatorservice/v1"
35+
"go.temporal.io/api/workflowservice/v1"
3436
"google.golang.org/grpc"
3537
"google.golang.org/grpc/health"
3638
healthpb "google.golang.org/grpc/health/grpc_health_v1"
3739
"google.golang.org/grpc/reflection"
3840

39-
"go.temporal.io/api/operatorservice/v1"
40-
"go.temporal.io/api/workflowservice/v1"
41-
4241
"go.temporal.io/server/api/adminservice/v1"
4342
"go.temporal.io/server/common"
4443
"go.temporal.io/server/common/dynamicconfig"
@@ -85,7 +84,7 @@ type Config struct {
8584
WorkerBuildIdSizeLimit dynamicconfig.IntPropertyFn
8685
DisallowQuery dynamicconfig.BoolPropertyFnWithNamespaceFilter
8786
ShutdownDrainDuration dynamicconfig.DurationPropertyFn
88-
ShutdownFailHealthcheckDuration dynamicconfig.DurationPropertyFn
87+
ShutdownFailHealthCheckDuration dynamicconfig.DurationPropertyFn
8988

9089
MaxBadBinaries dynamicconfig.IntPropertyFnWithNamespaceFilter
9190

@@ -208,7 +207,7 @@ func NewConfig(dc *dynamicconfig.Collection, numHistoryShards int32, enableReadF
208207
BlobSizeLimitWarn: dc.GetIntPropertyFilteredByNamespace(dynamicconfig.BlobSizeLimitWarn, 256*1024),
209208
ThrottledLogRPS: dc.GetIntProperty(dynamicconfig.FrontendThrottledLogRPS, 20),
210209
ShutdownDrainDuration: dc.GetDurationProperty(dynamicconfig.FrontendShutdownDrainDuration, 0*time.Second),
211-
ShutdownFailHealthcheckDuration: dc.GetDurationProperty(dynamicconfig.FrontendShutdownFailHealthcheckDuration, 10*time.Second),
210+
ShutdownFailHealthCheckDuration: dc.GetDurationProperty(dynamicconfig.FrontendShutdownFailHealthCheckDuration, 0*time.Second),
212211
EnableNamespaceNotActiveAutoForwarding: dc.GetBoolPropertyFnWithNamespaceFilter(dynamicconfig.EnableNamespaceNotActiveAutoForwarding, true),
213212
SearchAttributesNumberOfKeysLimit: dc.GetIntPropertyFilteredByNamespace(dynamicconfig.SearchAttributesNumberOfKeysLimit, 100),
214213
SearchAttributesSizeOfValueLimit: dc.GetIntPropertyFilteredByNamespace(dynamicconfig.SearchAttributesSizeOfValueLimit, 2*1024),
@@ -342,7 +341,7 @@ func (s *Service) Stop() {
342341
// 5. Stop everything forcefully and return
343342

344343
requestDrainTime := util.Max(time.Second, s.config.ShutdownDrainDuration())
345-
failureDetectionTime := util.Max(0, s.config.ShutdownFailHealthcheckDuration())
344+
failureDetectionTime := util.Max(0, s.config.ShutdownFailHealthCheckDuration())
346345

347346
logger.Info("ShutdownHandler: Updating gRPC health status to ShuttingDown")
348347
s.healthServer.Shutdown()

0 commit comments

Comments
 (0)