Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
Signed-off-by: okJiang <[email protected]>
  • Loading branch information
okJiang committed Jan 22, 2025
1 parent 9fe44ee commit 8de091e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion tools/pd-backup/pdbackup/backup.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ import (

clientv3 "go.etcd.io/etcd/client/v3"

"github.com/tikv/pd/pkg/mcs/utils/constant"
"github.com/tikv/pd/pkg/utils/etcdutil"
"github.com/tikv/pd/pkg/utils/keypath"
"github.com/tikv/pd/pkg/utils/typeutil"
Expand Down Expand Up @@ -76,7 +77,7 @@ func GetBackupInfo(client *clientv3.Client, pdAddr string) (*BackupInfo, error)

backInfo.AllocIDMax = allocIDMax

resp, err = etcdutil.EtcdKVGet(client, keypath.TimestampPath(rootPath))
resp, err = etcdutil.EtcdKVGet(client, keypath.TimestampPath(constant.DefaultKeyspaceGroupID))
if err != nil {
return nil, err
}
Expand Down
3 changes: 2 additions & 1 deletion tools/pd-backup/pdbackup/backup_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ import (
"go.etcd.io/etcd/server/v3/embed"
"go.uber.org/goleak"

"github.com/tikv/pd/pkg/mcs/utils/constant"
sc "github.com/tikv/pd/pkg/schedule/config"
"github.com/tikv/pd/pkg/utils/etcdutil"
"github.com/tikv/pd/pkg/utils/keypath"
Expand Down Expand Up @@ -129,7 +130,7 @@ func (s *backupTestSuite) BeforeTest(string, string) {
rootPath = path.Join(pdRootPath, strconv.FormatUint(clusterID, 10))
allocTimestampMaxBytes = typeutil.Uint64ToBytes(allocTimestampMax)
)
_, err = s.etcdClient.Put(ctx, keypath.TimestampPath(rootPath), string(allocTimestampMaxBytes))
_, err = s.etcdClient.Put(ctx, keypath.TimestampPath(constant.DefaultKeyspaceGroupID), string(allocTimestampMaxBytes))
re.NoError(err)

var (
Expand Down

0 comments on commit 8de091e

Please sign in to comment.