Skip to content

Commit

Permalink
Revert "Created Shard Manager Service (uber#6297)"
Browse files Browse the repository at this point in the history
This reverts commit 45d5403.
  • Loading branch information
Shaddoll committed Oct 15, 2024
1 parent f8d70de commit 6b466a9
Show file tree
Hide file tree
Showing 15 changed files with 3 additions and 1,119 deletions.
3 changes: 0 additions & 3 deletions cmd/server/cadence/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,6 @@ import (
"github.com/uber/cadence/service/frontend"
"github.com/uber/cadence/service/history"
"github.com/uber/cadence/service/matching"
"github.com/uber/cadence/service/shardmanager"
"github.com/uber/cadence/service/worker"
)

Expand Down Expand Up @@ -273,8 +272,6 @@ func (s *server) startService() common.Daemon {
daemon, err = matching.NewService(&params)
case service.Worker:
daemon, err = worker.NewService(&params)
case service.ShardManager:
daemon, err = shardmanager.NewService(&params, resource.NewResourceFactory())
}
if err != nil {
params.Logger.Fatal("Fail to start "+s.name+" service ", tag.Error(err))
Expand Down
38 changes: 0 additions & 38 deletions common/dynamicconfig/constants.go
Original file line number Diff line number Diff line change
Expand Up @@ -1467,29 +1467,6 @@ const (
// Value type: Int
// Default value: 100
ESAnalyzerMinNumWorkflowsForAvg

// key for shard manager

// ShardManagerPersistenceMaxQPS is the max qps a shard manager host can query DB
// KeyName: shardManager.persistenceMaxQPS
// Value type: Int
// Default value: 3000
// Allowed filters: N/A
ShardManagerPersistenceMaxQPS
// ShardManagerPersistenceGlobalMaxQPS is the max qps matching cluster can query DB
// KeyName: shardManager.persistenceGlobalMaxQPS
// Value type: Int
// Default value: 0
// Allowed filters: N/A
ShardManagerPersistenceGlobalMaxQPS

// ShardManagerThrottledLogRPS is the rate limit on number of log messages emitted per second for throttled logger
// KeyName: shardManager.throttledLogRPS
// Value type: Int
// Default value: 20
// Allowed filters: N/A
ShardManagerThrottledLogRPS

// Usage: VisibilityArchivalQueryMaxRangeInDays is the maximum number of days for a visibility archival query
// KeyName: N/A
// Default value: N/A
Expand Down Expand Up @@ -3960,21 +3937,6 @@ var IntKeys = map[IntKey]DynamicInt{
Description: "ESAnalyzerMinNumWorkflowsForAvg controls how many workflows to have at least to rely on workflow run time avg per type",
DefaultValue: 100,
},
ShardManagerPersistenceMaxQPS: {
KeyName: "shardManager.persistenceMaxQPS",
Description: "ShardManagerPersistenceMaxQPS is the max qps shard manager host can query DB",
DefaultValue: 3000,
},
ShardManagerPersistenceGlobalMaxQPS: {
KeyName: "shardManager.persistenceGlobalMaxQPS",
Description: "ShardManagerPersistenceGlobalMaxQPS is the max qps shard manager cluster can query DB",
DefaultValue: 0,
},
ShardManagerThrottledLogRPS: {
KeyName: "shardManager.throttledLogRPS",
Description: "ShardManagerThrottledLogRPS is the rate limit on number of log messages emitted per second for throttled logger",
DefaultValue: 20,
},
VisibilityArchivalQueryMaxRangeInDays: {
KeyName: "frontend.visibilityArchivalQueryMaxRangeInDays",
Description: "VisibilityArchivalQueryMaxRangeInDays is the maximum number of days for a visibility archival query",
Expand Down
1 change: 0 additions & 1 deletion common/metrics/defs.go
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,6 @@ const (
History
Matching
Worker
ShardManager
NumServices
)

Expand Down
10 changes: 0 additions & 10 deletions common/resource/resource.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,6 @@
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.

//go:generate mockgen -package $GOPACKAGE -source $GOFILE -destination resource_mock.go -self_package github.com/uber/cadence/common/resource

package resource

import (
Expand Down Expand Up @@ -50,16 +48,8 @@ import (
"github.com/uber/cadence/common/persistence"
persistenceClient "github.com/uber/cadence/common/persistence/client"
"github.com/uber/cadence/common/quotas/global/rpc"
"github.com/uber/cadence/common/service"
)

type ResourceFactory interface {
NewResource(params *Params,
serviceName string,
serviceConfig *service.Config,
) (resource Resource, err error)
}

type (
// Resource is the interface which expose common resources
Resource interface {
Expand Down
13 changes: 0 additions & 13 deletions common/resource/resourceImpl.go
Original file line number Diff line number Diff line change
Expand Up @@ -63,19 +63,6 @@ import (
"github.com/uber/cadence/common/service"
)

func NewResourceFactory() ResourceFactory {
return &resourceImplFactory{}
}

type resourceImplFactory struct{}

func (*resourceImplFactory) NewResource(params *Params,
serviceName string,
serviceConfig *service.Config,
) (resource Resource, err error) {
return New(params, serviceName, serviceConfig)
}

type (

// VisibilityManagerInitializer is the function each service should implement
Expand Down
Loading

0 comments on commit 6b466a9

Please sign in to comment.