Skip to content

Commit

Permalink
adjust log
Browse files Browse the repository at this point in the history
  • Loading branch information
3AceShowHand committed Dec 15, 2023
1 parent 4495e45 commit 3b1a0b2
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 6 deletions.
12 changes: 8 additions & 4 deletions cdc/entry/schema_storage.go
Original file line number Diff line number Diff line change
Expand Up @@ -203,8 +203,10 @@ func (s *schemaStorageImpl) HandleDDLJob(job *timodel.Job) error {
log.Error("schemaStorage: update snapshot by the DDL job failed",
zap.String("namespace", s.id.Namespace),
zap.String("changefeed", s.id.ID),
zap.String("DDL", job.Query),
zap.Uint64("finishTs", job.BinlogInfo.FinishedTS),
zap.String("schema", job.SchemaName),
zap.String("table", job.TableName),
zap.String("query", job.Query),
zap.Uint64("finishedTs", job.BinlogInfo.FinishedTS),
zap.String("role", s.role.String()),
zap.Error(err))
return errors.Trace(err)
Expand All @@ -215,8 +217,10 @@ func (s *schemaStorageImpl) HandleDDLJob(job *timodel.Job) error {
log.Info("schemaStorage: update snapshot by the DDL job",
zap.String("namespace", s.id.Namespace),
zap.String("changefeed", s.id.ID),
zap.String("DDL", job.Query),
zap.Uint64("finishTs", job.BinlogInfo.FinishedTS),
zap.String("schema", job.SchemaName),
zap.String("table", job.TableName),
zap.String("query", job.Query),
zap.Uint64("finishedTs", job.BinlogInfo.FinishedTS),
zap.Uint64("schemaVersion", uint64(s.schemaVersion)),
zap.String("role", s.role.String()))
return nil
Expand Down
8 changes: 6 additions & 2 deletions cdc/puller/ddl_puller.go
Original file line number Diff line number Diff line change
Expand Up @@ -418,7 +418,7 @@ func (p *ddlJobPullerImpl) handleJob(job *timodel.Job) (skip bool, err error) {
zap.String("schema", job.SchemaName),
zap.String("table", job.TableName),
zap.Uint64("startTs", job.StartTS),
zap.Uint64("jobFinishedTS", job.BinlogInfo.FinishedTS),
zap.Uint64("finishedTs", job.BinlogInfo.FinishedTS),
zap.String("query", job.Query),
zap.Uint64("pullerResolvedTs", p.getResolvedTs()))
return true, nil
Expand Down Expand Up @@ -495,9 +495,11 @@ func (p *ddlJobPullerImpl) handleJob(job *timodel.Job) (skip bool, err error) {
log.Info("ddl puller receive rename table ddl job",
zap.String("namespace", p.changefeedID.Namespace),
zap.String("changefeed", p.changefeedID.ID),
zap.String("schema", job.SchemaName),
zap.String("table", job.TableName),
zap.String("query", job.Query),
zap.Uint64("startTs", job.StartTS),
zap.Uint64("finishTs", job.BinlogInfo.FinishedTS))
zap.Uint64("finishedTs", job.BinlogInfo.FinishedTS))
default:
// nil means it is a schema ddl job, it's no need to fill the table name.
if job.BinlogInfo.TableInfo != nil {
Expand Down Expand Up @@ -690,6 +692,8 @@ func (h *ddlPullerImpl) addToPending(job *timodel.Job) {
log.Info("ddl puller receives new pending job",
zap.String("namespace", h.changefeedID.Namespace),
zap.String("changefeed", h.changefeedID.ID),
zap.String("schema", job.SchemaName),
zap.String("table", job.TableName),
zap.String("query", job.Query),
zap.Int64("jobID", job.ID))
}
Expand Down

0 comments on commit 3b1a0b2

Please sign in to comment.