Skip to content

Commit a06da89

Browse files
authored
Remove matching.useOldRouting dynamic config (#3824)
1 parent 285bf33 commit a06da89

File tree

3 files changed

+1
-13
lines changed

3 files changed

+1
-13
lines changed

client/clientfactory.go

-1
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,6 @@ func (cf *rpcClientFactory) NewMatchingClientWithTimeout(
157157
longPollTimeout,
158158
common.NewClientCache(keyResolver, clientProvider),
159159
matching.NewLoadBalancer(namespaceIDToName, cf.dynConfig),
160-
cf.dynConfig.GetBoolProperty(dynamicconfig.MatchingUseOldRouting, true),
161160
)
162161

163162
if cf.metricsHandler != nil {

client/matching/client.go

+1-10
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,6 @@ import (
3939
"go.temporal.io/server/api/matchingservice/v1"
4040
"go.temporal.io/server/common"
4141
"go.temporal.io/server/common/debug"
42-
"go.temporal.io/server/common/dynamicconfig"
4342
"go.temporal.io/server/common/namespace"
4443
)
4544

@@ -57,7 +56,6 @@ type clientImpl struct {
5756
longPollTimeout time.Duration
5857
clients common.ClientCache
5958
loadBalancer LoadBalancer
60-
useOldRouting dynamicconfig.BoolPropertyFn
6159
}
6260

6361
// NewClient creates a new history service gRPC client
@@ -66,14 +64,12 @@ func NewClient(
6664
longPollTimeout time.Duration,
6765
clients common.ClientCache,
6866
lb LoadBalancer,
69-
useOldRouting dynamicconfig.BoolPropertyFn,
7067
) matchingservice.MatchingServiceClient {
7168
return &clientImpl{
7269
timeout: timeout,
7370
longPollTimeout: longPollTimeout,
7471
clients: clients,
7572
loadBalancer: lb,
76-
useOldRouting: useOldRouting,
7773
}
7874
}
7975

@@ -207,12 +203,7 @@ func (c *clientImpl) getClientForTaskqueue(
207203
taskQueue *taskqueuepb.TaskQueue,
208204
taskQueueType enumspb.TaskQueueType,
209205
) (matchingservice.MatchingServiceClient, error) {
210-
var key string
211-
if c.useOldRouting() {
212-
key = taskQueue.Name
213-
} else {
214-
key = fmt.Sprintf("%s:%s:%d", namespaceID, taskQueue.Name, int(taskQueueType))
215-
}
206+
key := fmt.Sprintf("%s:%s:%d", namespaceID, taskQueue.Name, int(taskQueueType))
216207
client, err := c.clients.GetClientForKey(key)
217208
if err != nil {
218209
return nil, err

common/dynamicconfig/constants.go

-2
Original file line numberDiff line numberDiff line change
@@ -319,8 +319,6 @@ const (
319319
MatchingShutdownDrainDuration = "matching.shutdownDrainDuration"
320320
// MatchingMetadataPollFrequency is how often non-root partitions will poll the root partition for fresh metadata
321321
MatchingMetadataPollFrequency = "matching.metadataPollFrequency"
322-
// MatchingUseOldRouting is whether to use old task queue routing (name only) instead of namespace+name+type.
323-
MatchingUseOldRouting = "matching.useOldRouting"
324322

325323
// keys for history
326324

0 commit comments

Comments
 (0)