Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
Signed-off-by: Ryan Leung <[email protected]>
  • Loading branch information
rleungx committed Oct 31, 2024
1 parent 1355938 commit c314f61
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
2 changes: 0 additions & 2 deletions pkg/tso/keyspace_group_manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -417,7 +416,6 @@ func NewKeyspaceGroupManager(
ctx: ctx,
cancel: cancel,
tsoServiceID: tsoServiceID,
clusterID: clusterID,
etcdClient: etcdClient,
httpClient: httpClient,
electionNamePrefix: electionNamePrefix,
Expand Down
8 changes: 4 additions & 4 deletions pkg/tso/keyspace_group_manager_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"))
Expand Down Expand Up @@ -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"))
Expand Down

0 comments on commit c314f61

Please sign in to comment.