diff --git a/pkg/tso/keyspace_group_manager.go b/pkg/tso/keyspace_group_manager.go index cdefa503a88..22723aabf65 100644 --- a/pkg/tso/keyspace_group_manager.go +++ b/pkg/tso/keyspace_group_manager.go @@ -322,7 +322,6 @@ type KeyspaceGroupManager struct { // tsoServiceID is the service ID of the TSO service, registered in the service discovery tsoServiceID *discovery.ServiceRegistryEntry - clusterID uint64 etcdClient *clientv3.Client httpClient *http.Client // electionNamePrefix is the name prefix to generate the unique name of a participant, @@ -417,7 +416,6 @@ func NewKeyspaceGroupManager( ctx: ctx, cancel: cancel, tsoServiceID: tsoServiceID, - clusterID: clusterID, etcdClient: etcdClient, httpClient: httpClient, electionNamePrefix: electionNamePrefix, diff --git a/pkg/tso/keyspace_group_manager_test.go b/pkg/tso/keyspace_group_manager_test.go index bab789f0e0f..b851904f4aa 100644 --- a/pkg/tso/keyspace_group_manager_test.go +++ b/pkg/tso/keyspace_group_manager_test.go @@ -1225,8 +1225,8 @@ func waitForPrimariesServing( func (suite *keyspaceGroupManagerTestSuite) TestRegisterAllocatorConflict() { re := suite.Require() - legacySvcRootPath := keypath.LegacyRootPath(suite.ClusterID) - allocatorKeyPrefix := keypath.GlobalTSOAllocatorsPrefix(suite.ClusterID) + legacySvcRootPath := keypath.LegacyRootPath() + allocatorKeyPrefix := keypath.GlobalTSOAllocatorsPrefix() legacySvcStorage := endpoint.NewStorageEndpoint(kv.NewEtcdKVBase(suite.etcdClient, legacySvcRootPath), nil) m := member.NewMember(suite.servers[0], suite.etcdClient, uint64(suite.servers[0].Server.ID())) am := NewAllocatorManager(suite.ctx, suite.etcdClient, constant.DefaultKeyspaceGroupID, m, legacySvcRootPath, legacySvcStorage, suite.cfg, allocatorKeyPrefix, path.Join(allocatorKeyPrefix, "pd")) @@ -1271,8 +1271,8 @@ func (suite *keyspaceGroupManagerTestSuite) TestRegisterAllocatorConflict() { go func() { defer wg1.Done() - legacySvcRootPath := keypath.LegacyRootPath(suite.ClusterID) - allocatorKeyPrefix := keypath.GlobalTSOAllocatorsPrefix(suite.ClusterID) + legacySvcRootPath := keypath.LegacyRootPath() + allocatorKeyPrefix := keypath.GlobalTSOAllocatorsPrefix() legacySvcStorage := endpoint.NewStorageEndpoint(kv.NewEtcdKVBase(suite.etcdClient, legacySvcRootPath), nil) m := member.NewMember(suite.servers[0], suite.etcdClient, uint64(suite.servers[0].Server.ID())) am := NewAllocatorManager(suite.ctx, suite.etcdClient, constant.DefaultKeyspaceGroupID, m, legacySvcRootPath, legacySvcStorage, suite.cfg, allocatorKeyPrefix, path.Join(allocatorKeyPrefix, "pd"))