-
Notifications
You must be signed in to change notification settings - Fork 288
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
ticdc/mq: accurately demonstrate txn_batch_size metric for MQ sink #3609
ticdc/mq: accurately demonstrate txn_batch_size metric for MQ sink #3609
Conversation
[REVIEW NOTIFICATION] This pull request has been approved by:
To complete the pull request process, please ask the reviewers in the list to review by filling The full list of commands accepted by this bot can be found here. Reviewer can indicate their review by submitting an approval review. |
cdc/sink/codec/json.go
Outdated
@@ -461,6 +461,7 @@ func (d *JSONEventBatchEncoder) AppendRowChangedEvent(e *model.RowChangedEvent) | |||
message.Ts = e.CommitTs | |||
message.Schema = &e.Table.Schema | |||
message.Table = &e.Table.Table | |||
message.RowsCount++ |
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.
please take a look at craft
codec, it also batch multiple rows into the same message.
cdc/sink/codec/interface.go
Outdated
Table *string // table | ||
Type model.MqMessageType // type | ||
Protocol Protocol // protocol | ||
RowsCount int // rows in one MQ Message |
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.
I would prefer make RowsCount
private and export Get
and Inc
method for it.
/merge |
@zhaoxinyu: In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the ti-community-infra/tichi repository. |
/merge |
This pull request has been accepted and is ready to merge. Commit hash: 2f48a7a
|
/run-integration-test |
/run-cherry-picker |
Signed-off-by: ti-chi-bot <ti-community-prow-bot@tidb.io>
In response to a cherrypick label: new pull request created: #3818. |
In response to a cherrypick label: new pull request created: #3817. |
In response to a cherrypick label: new pull request created: #3819. |
Signed-off-by: ti-chi-bot <ti-community-prow-bot@tidb.io>
In response to a cherrypick label: new pull request created: #3820. |
Signed-off-by: ti-chi-bot <ti-community-prow-bot@tidb.io>
In response to a cherrypick label: new pull request created: #3821. |
…3609) (#3819) * fix the txn_batch_size metric inaccuracy bug when the sink target is MQ * address comments * add comments for exported functions * fix the compiling problem * fix conflicts. Co-authored-by: zhaoxinyu <zhaoxinyu512@gmail.com> Co-authored-by: Ling Jin <7138436+3AceShowHand@users.noreply.github.com> Co-authored-by: 3AceShowHand <jinl1037@hotmail.com>
…3609) (#3817) * fix the txn_batch_size metric inaccuracy bug when the sink target is MQ * address comments * add comments for exported functions * fix the compiling problem * fix conflicts. * fix comment. Co-authored-by: zhaoxinyu <zhaoxinyu512@gmail.com> Co-authored-by: 3AceShowHand <jinl1037@hotmail.com> Co-authored-by: Ling Jin <7138436+3AceShowHand@users.noreply.github.com>
What problem does this PR solve?
#3431
What is changed and how it works?
In order to accurately show the txn_batch_size metric, we use the total number of rows instead of messages when the sink target is MQ.
Check List
Tests
Release note