Skip to content
This repository has been archived by the owner on Nov 24, 2023. It is now read-only.

Commit

Permalink
fix ci
Browse files Browse the repository at this point in the history
  • Loading branch information
GMHDBJD committed Dec 21, 2020
1 parent db85f8f commit 41ef863
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 5 deletions.
2 changes: 2 additions & 0 deletions dm/worker/server.go
Expand Up @@ -560,6 +560,8 @@ func (s *Server) startWorker(cfg *config.SourceConfig) error {
if err != nil {
return err
}
} else {
cfg.UUIDSuffix = binlog.MinUUIDSuffix
}
}

Expand Down
7 changes: 4 additions & 3 deletions pkg/binlog/position.go
Expand Up @@ -36,7 +36,8 @@ const (
// eg. mysql-bin.000003 in c6ae5afe-c7a3-11e8-a19d-0242ac130006.000002 => mysql-bin|000002.000003
// where `000002` in `c6ae5afe-c7a3-11e8-a19d-0242ac130006.000002` is the UUIDSuffix
posUUIDSuffixSeparator = "|"
minUUIDSuffix = 1
// MinUUIDSuffix is same as relay.MinUUIDSuffix
MinUUIDSuffix = 1
)

var (
Expand Down Expand Up @@ -114,7 +115,7 @@ func RealMySQLPos(pos gmysql.Position) (gmysql.Position, error) {
// ExtractSuffix extracts uuidSuffix from input name
func ExtractSuffix(name string) (int, error) {
if len(name) == 0 {
return minUUIDSuffix, nil
return MinUUIDSuffix, nil
}
filename, err := ParseFilename(name)
if err != nil {
Expand All @@ -126,7 +127,7 @@ func ExtractSuffix(name string) (int, error) {
v, err := strconv.ParseInt(suffix, 10, 64)
return int(v), err
}
return minUUIDSuffix, nil
return MinUUIDSuffix, nil
}

// ExtractPos extracts (uuidWithSuffix, uuidSuffix, originalPos) from input pos (originalPos or convertedPos)
Expand Down
4 changes: 2 additions & 2 deletions pkg/binlog/position_test.go
Expand Up @@ -773,10 +773,10 @@ func (t *testPositionSuite) TestExtractSuffix(c *C) {
}{
{
"",
minUUIDSuffix,
MinUUIDSuffix,
}, {
"mysql-bin.00005",
minUUIDSuffix,
MinUUIDSuffix,
},
{
"mysql-bin|000001.000001",
Expand Down

0 comments on commit 41ef863

Please sign in to comment.