Skip to content

Commit

Permalink
Set default ES bulk processor ack timeout to 1 minute (#1210)
Browse files Browse the repository at this point in the history
  • Loading branch information
alexshtin authored Jan 21, 2021
1 parent b46fbe3 commit 1428a3d
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion common/persistence/elasticsearch/esVisibilityStore_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ func (s *ESVisibilitySuite) SetupTest() {
cfg := &config.VisibilityConfig{
ESIndexMaxResultWindow: dynamicconfig.GetIntPropertyFn(3),
ValidSearchAttributes: dynamicconfig.GetMapPropertyFn(definition.GetDefaultIndexedKeys()),
ESProcessorAckTimeout: dynamicconfig.GetDurationPropertyFn(5 * time.Second),
ESProcessorAckTimeout: dynamicconfig.GetDurationPropertyFn(1 * time.Minute),
}

s.mockMetricsClient = &metricsmocks.Client{}
Expand Down
2 changes: 1 addition & 1 deletion host/testcluster.go
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ func NewCluster(options *TestClusterConfig, logger log.Logger) (*TestCluster, er
VisibilityListMaxQPS: dynamicconfig.GetIntPropertyFilteredByNamespace(2000),
ESIndexMaxResultWindow: dynamicconfig.GetIntPropertyFn(defaultTestValueOfESIndexMaxResultWindow),
ValidSearchAttributes: dynamicconfig.GetMapPropertyFn(definition.GetDefaultIndexedKeys()),
ESProcessorAckTimeout: dynamicconfig.GetDurationPropertyFn(5 * time.Second),
ESProcessorAckTimeout: dynamicconfig.GetDurationPropertyFn(1 * time.Minute),
}
indexName := options.ESConfig.Indices[common.VisibilityAppName]
esVisibilityStore := pes.NewElasticSearchVisibilityStore(esClient, indexName, nil, esProcessor, visConfig, logger, &metricsmocks.Client{})
Expand Down
2 changes: 1 addition & 1 deletion service/history/configs/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -447,7 +447,7 @@ func NewConfig(dc *dynamicconfig.Collection, numberOfShards int32, isAdvancedVis
ESProcessorBulkActions: dc.GetIntProperty(dynamicconfig.WorkerESProcessorBulkActions, 1000),
ESProcessorBulkSize: dc.GetIntProperty(dynamicconfig.WorkerESProcessorBulkSize, 2<<24), // 16MB
ESProcessorFlushInterval: dc.GetDurationProperty(dynamicconfig.WorkerESProcessorFlushInterval, 1*time.Second),
ESProcessorAckTimeout: dc.GetDurationProperty(dynamicconfig.WorkerESProcessorAckTimeout, 5*time.Second),
ESProcessorAckTimeout: dc.GetDurationProperty(dynamicconfig.WorkerESProcessorAckTimeout, 1*time.Minute),
}

return cfg
Expand Down
2 changes: 1 addition & 1 deletion tools/cli/namespaceUtils.go
Original file line number Diff line number Diff line change
Expand Up @@ -293,7 +293,7 @@ func initializeMetadataMgr(
pConfig.VisibilityConfig = &config.VisibilityConfig{
VisibilityListMaxQPS: dynamicconfig.GetIntPropertyFilteredByNamespace(dependencyMaxQPS),
EnableSampling: dynamicconfig.GetBoolPropertyFn(false), // not used by namespace operation
ESProcessorAckTimeout: dynamicconfig.GetDurationPropertyFn(5 * time.Second),
ESProcessorAckTimeout: dynamicconfig.GetDurationPropertyFn(1 * time.Minute),
}
pFactory := client.NewFactory(
&pConfig,
Expand Down

0 comments on commit 1428a3d

Please sign in to comment.