-
Notifications
You must be signed in to change notification settings - Fork 188
Conversation
@GregoryIan @amyangfei PTAL |
syncer/syncer.go
Outdated
@@ -1574,6 +1574,8 @@ func (s *Syncer) Run(ctx context.Context) (err error) { | |||
if err != nil { | |||
return errors.Trace(err) | |||
} | |||
target, _ := GenTableID(ddlInfo.tableNames[1][0].Schema, ddlInfo.tableNames[1][0].Name) | |||
unsyncedTableGauge.WithLabelValues(s.cfg.Name, target).Set(float64(remain)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why not put it into L1582 scope? and I'm afraid two many table in this metric
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this scope can be reached only in sharding mode, see continue
in L1542.
and we obtain remain
in this scope.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
in order to handle CreateTableStmt
in L1565, so we move it into L1582 scope?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
addressed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yep, and we also have non-shard table in shard mode
syncer/metrics.go
Outdated
Namespace: "dm", | ||
Subsystem: "syncer", | ||
Name: "shard_lock_resolving", | ||
Help: "waiting sharding DDL lock to be resolved", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
shard or sharding?
Rest LGTM |
/run-all-tests |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
LGTM |
What problem does this PR solve?
Support to judge whether waiting for sharding DDL lock to be resolved through metrics.
What is changed and how it works?
Check List
Tests
dm_syncer_unsynced_table_number
/dm_syncer_shard_lock_resolving
dm_syncer_unsynced_table_number
/dm_syncer_shard_lock_resolving
dm_syncer_unsynced_table_number
/dm_syncer_shard_lock_resolving
Side effects
Related changes
dm/dm-ansible