-
Notifications
You must be signed in to change notification settings - Fork 283
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
cdc, pkg: replace table ID with table name in metrics #695
Conversation
Signed-off-by: Neil Shen <overvenus@gmail.com>
/run-integration-tests |
Signed-off-by: Neil Shen <overvenus@gmail.com>
Signed-off-by: Neil Shen <overvenus@gmail.com>
/run-integration-tests |
Codecov Report
@@ Coverage Diff @@
## master #695 +/- ##
===========================================
Coverage 32.2594% 32.2594%
===========================================
Files 90 90
Lines 9653 9653
===========================================
Hits 3114 3114
Misses 6285 6285
Partials 254 254 |
cdc/processor.go
Outdated
@@ -163,7 +163,7 @@ func newProcessor( | |||
// so we set `needEncode` to false. | |||
log.Info("start processor with startts", zap.Uint64("startts", checkpointTs)) | |||
ddlPuller := puller.NewPuller(pdCli, kvStorage, checkpointTs, []regionspan.Span{regionspan.GetDDLSpan(), regionspan.GetAddIndexDDLSpan()}, false, limitter) | |||
ctx = util.PutTableIDInCtx(ctx, 0) | |||
ctx = util.PutTableInfoInCtx(ctx, 0, "") |
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 line can be removed now
cdc/processor.go
Outdated
@@ -214,7 +214,7 @@ func newProcessor( | |||
func (p *processor) Run(ctx context.Context) { | |||
wg, cctx := errgroup.WithContext(ctx) | |||
p.wg = wg | |||
ddlPullerCtx, ddlPullerCancel := context.WithCancel(util.PutTableIDInCtx(cctx, 0)) | |||
ddlPullerCtx, ddlPullerCancel := context.WithCancel(util.PutTableInfoInCtx(cctx, 0, "")) |
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.
what about assigning a mock table name, such as ticdc-processor-ddl
, ditto for the context used in the onwer's ddl puller.
for tableID, op := range operation { | ||
var orphanMarkTableID model.TableID | ||
tableName, found := schemaSnapshot.GetTableNameByID(tableID) | ||
if !found { | ||
continue |
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.
Better to add a warning log here
Signed-off-by: Neil Shen <overvenus@gmail.com>
/run-integration-tests |
1 similar comment
/run-integration-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
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
/run-integration-tests |
Base on prometheus spec, label name must match the regex |
* cdc, pkg: replace table ID with table name in metrics * cherry-pick pingcap#692 bugfix Signed-off-by: Neil Shen <overvenus@gmail.com>
What problem does this PR solve?
Replace table ID with table name in metrics.
Cc #677
Check List
Tests
Code changes
Side effects
Related changes
Release note