Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove matching.useOldRouting dynamic config #3824

Merged
merged 1 commit into from
Jan 25, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion client/clientfactory.go
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,6 @@ func (cf *rpcClientFactory) NewMatchingClientWithTimeout(
longPollTimeout,
common.NewClientCache(keyResolver, clientProvider),
matching.NewLoadBalancer(namespaceIDToName, cf.dynConfig),
cf.dynConfig.GetBoolProperty(dynamicconfig.MatchingUseOldRouting, true),
)

if cf.metricsHandler != nil {
Expand Down
11 changes: 1 addition & 10 deletions client/matching/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ import (
"go.temporal.io/server/api/matchingservice/v1"
"go.temporal.io/server/common"
"go.temporal.io/server/common/debug"
"go.temporal.io/server/common/dynamicconfig"
"go.temporal.io/server/common/namespace"
)

Expand All @@ -57,7 +56,6 @@ type clientImpl struct {
longPollTimeout time.Duration
clients common.ClientCache
loadBalancer LoadBalancer
useOldRouting dynamicconfig.BoolPropertyFn
}

// NewClient creates a new history service gRPC client
Expand All @@ -66,14 +64,12 @@ func NewClient(
longPollTimeout time.Duration,
clients common.ClientCache,
lb LoadBalancer,
useOldRouting dynamicconfig.BoolPropertyFn,
) matchingservice.MatchingServiceClient {
return &clientImpl{
timeout: timeout,
longPollTimeout: longPollTimeout,
clients: clients,
loadBalancer: lb,
useOldRouting: useOldRouting,
}
}

Expand Down Expand Up @@ -207,12 +203,7 @@ func (c *clientImpl) getClientForTaskqueue(
taskQueue *taskqueuepb.TaskQueue,
taskQueueType enumspb.TaskQueueType,
) (matchingservice.MatchingServiceClient, error) {
var key string
if c.useOldRouting() {
key = taskQueue.Name
} else {
key = fmt.Sprintf("%s:%s:%d", namespaceID, taskQueue.Name, int(taskQueueType))
}
key := fmt.Sprintf("%s:%s:%d", namespaceID, taskQueue.Name, int(taskQueueType))
client, err := c.clients.GetClientForKey(key)
if err != nil {
return nil, err
Expand Down
2 changes: 0 additions & 2 deletions common/dynamicconfig/constants.go
Original file line number Diff line number Diff line change
Expand Up @@ -317,8 +317,6 @@ const (
MatchingShutdownDrainDuration = "matching.shutdownDrainDuration"
// MatchingMetadataPollFrequency is how often non-root partitions will poll the root partition for fresh metadata
MatchingMetadataPollFrequency = "matching.metadataPollFrequency"
// MatchingUseOldRouting is whether to use old task queue routing (name only) instead of namespace+name+type.
MatchingUseOldRouting = "matching.useOldRouting"

// keys for history

Expand Down