Skip to content

Commit

Permalink
Fix fmt error
Browse files Browse the repository at this point in the history
Signed-off-by: Bin Shi <binshi.bing@gmail.com>
  • Loading branch information
binshi-bing committed May 15, 2023
1 parent c66370d commit e6f3f4e
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 12 deletions.
12 changes: 6 additions & 6 deletions pkg/tso/allocator_manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,13 +46,13 @@ import (

const (
// GlobalDCLocation is the Global TSO Allocator's DC location label.
GlobalDCLocation = "global"
checkStep = time.Minute
patrolStep = time.Second
defaultAllocatorLeaderLease = 3
GlobalDCLocation = "global"
checkStep = time.Minute
patrolStep = time.Second
defaultAllocatorLeaderLease = 3
globalTSOAllocatorEtcdPrefix = "gta"
localTSOAllocatorEtcdPrefix = "lta"
localTSOSuffixEtcdPrefix = "lts"
localTSOAllocatorEtcdPrefix = "lta"
localTSOSuffixEtcdPrefix = "lts"
)

var (
Expand Down
3 changes: 1 addition & 2 deletions pkg/tso/global_allocator.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ import (
"github.com/pingcap/kvproto/pkg/pdpb"
"github.com/pingcap/log"
"github.com/tikv/pd/pkg/errs"
"github.com/tikv/pd/pkg/mcs/utils"
mcsutils "github.com/tikv/pd/pkg/mcs/utils"
"github.com/tikv/pd/pkg/slice"
"github.com/tikv/pd/pkg/utils/logutil"
Expand Down Expand Up @@ -96,7 +95,7 @@ func NewGlobalTSOAllocator(
// 2. for the non-default keyspace groups:
// {group}/gta in /ms/{cluster_id}/tso/{group}/gta/timestamp
tsPath := ""
if am.kgID != utils.DefaultKeyspaceGroupID {
if am.kgID != mcsutils.DefaultKeyspaceGroupID {
tsPath = path.Join(fmt.Sprintf("%05d", am.kgID), globalTSOAllocatorEtcdPrefix)
}

Expand Down
1 change: 0 additions & 1 deletion tests/integrations/mcs/tso/keyspace_group_manager_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,6 @@ func (suite *tsoKeyspaceGroupManagerTestSuite) TestKeyspacesServedByNonDefaultKe
} else {
timestampPath = fmt.Sprintf("/ms/%s/tso/%05d/gta/timestamp",
clusterID, param.keyspaceGroupID)

}
re.Equal(timestampPath, am.GetTimestampPath(""))

Expand Down
3 changes: 0 additions & 3 deletions tests/integrations/tso/client_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ package tso

import (
"context"
"fmt"
"math"
"math/rand"
"strings"
Expand Down Expand Up @@ -140,8 +139,6 @@ func (suite *tsoClientTestSuite) SetupSuite() {

suite.waitForAllKeyspaceGroupsInServing(re)
}

fmt.Println("TestSuite Setup Done !!!!!!!!!!!!!!!!!!!!!")
}

func (suite *tsoClientTestSuite) waitForAllKeyspaceGroupsInServing(re *require.Assertions) {
Expand Down

0 comments on commit e6f3f4e

Please sign in to comment.