Skip to content

Commit

Permalink
owner: fix checkpoint ts calculate in owner (pingcap#163)
Browse files Browse the repository at this point in the history
  • Loading branch information
amyangfei authored Dec 10, 2019
1 parent 3eb5270 commit d764389
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 14 deletions.
14 changes: 1 addition & 13 deletions cdc/owner.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ import (
"github.com/pingcap/ticdc/cdc/roles"
"github.com/pingcap/ticdc/cdc/roles/storage"
"github.com/pingcap/ticdc/cdc/schema"
"github.com/pingcap/tidb/store/tikv/oracle"
"go.uber.org/zap"
)

Expand Down Expand Up @@ -494,18 +493,7 @@ func (o *ownerImpl) calcResolvedTs() error {
minCheckpointTs := cfInfo.TargetTs

if len(cfInfo.tables) == 0 {
var ts uint64

physical, logical, err := o.pdClient.GetTS(context.Background())
if err != nil {
log.Warn("get ts from pd failed", zap.Error(err))
continue
}

ts = oracle.ComposeTS(physical, logical)

minResolvedTs = ts
minCheckpointTs = ts
minCheckpointTs = cfInfo.CheckpointTs
} else {
// calc the min of all resolvedTs in captures
for _, pStatus := range cfInfo.ProcessorInfos {
Expand Down
2 changes: 1 addition & 1 deletion cdc/schema/storage.go
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,7 @@ func (s *Storage) HandlePreviousDDLJobIfNeed(commitTs uint64) error {
var job *model.Job
for i, job = range s.jobs {
if skipJob(job) {
log.Debug("skip ddl job", zap.Stringer("job", job))
log.Info("skip ddl job", zap.Stringer("job", job))
continue
}

Expand Down

0 comments on commit d764389

Please sign in to comment.