Skip to content

Commit

Permalink
Apply stricter rate limiting for the RegisterNamespace API
Browse files Browse the repository at this point in the history
  • Loading branch information
bergundy committed Jun 16, 2023
1 parent 3392a7a commit 04d3925
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion service/frontend/configs/quotas.go
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@ var (
// The replication queue is used to propagate critical failover messages and this mapping prevents flooding the
// queue and delaying failover.
NamespaceReplicationInducingAPIToPriority = map[string]int{
"RegisterNamespace": 0,
"UpdateNamespace": 0,
"UpdateWorkerBuildIdCompatibility": 1,
}
Expand All @@ -109,7 +110,6 @@ var (
"GetSystemInfo": 0,
"GetSearchAttributes": 0,

"RegisterNamespace": 0,
"DescribeNamespace": 0,
"ListNamespaces": 0,
"DeprecateNamespace": 0,
Expand Down
4 changes: 2 additions & 2 deletions service/frontend/configs/quotas_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -186,8 +186,9 @@ func (s *quotasSuite) TestVisibilityAPIs() {

func (s *quotasSuite) TestNamespaceReplicationInducingAPIs() {
apis := map[string]struct{}{
"UpdateWorkerBuildIdCompatibility": {},
"RegisterNamespace": {},
"UpdateNamespace": {},
"UpdateWorkerBuildIdCompatibility": {},
}

var service workflowservice.WorkflowServiceServer
Expand All @@ -208,7 +209,6 @@ func (s *quotasSuite) TestOtherAPIs() {
"GetSystemInfo": {},
"GetSearchAttributes": {},

"RegisterNamespace": {},
"DescribeNamespace": {},
"ListNamespaces": {},
"DeprecateNamespace": {},
Expand Down

0 comments on commit 04d3925

Please sign in to comment.