Skip to content
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

codec(ticdc): use handlekey instead of primary key for avro #5601

Merged
merged 4 commits into from
May 26, 2022

Conversation

zhangyangyu
Copy link
Member

@zhangyangyu zhangyangyu commented May 26, 2022

What problem does this PR solve?

Issue Number: close #5597

What is changed and how it works?

Avro shall use Handle Key as message key in case when there is no primary key, we could still try to use a not null unique key , makes downstream easy to use these events.

When there is no handle key, such as force replica situations, Avro message keys would be null. Downstream consumers need to accomodate for this. (This is already the current behavriour)

Release note

None

@ti-chi-bot
Copy link
Member

ti-chi-bot commented May 26, 2022

[REVIEW NOTIFICATION]

This pull request has been approved by:

  • 3AceShowHand
  • maxshuang
  • zhaoxinyu

To complete the pull request process, please ask the reviewers in the list to review by filling /cc @reviewer in the comment.
After your PR has acquired the required number of LGTMs, you can assign this pull request to the committer in the list by filling /assign @committer in the comment to help you merge this pull request.

The full list of commands accepted by this bot can be found here.

Reviewer can indicate their review by submitting an approval review.
Reviewer can cancel approval by submitting a request changes review.

@ti-chi-bot ti-chi-bot added release-note-none Denotes a PR that doesn't merit a release note. needs-cherry-pick-release-6.1 Should cherry pick this PR to release-6.1 branch. labels May 26, 2022
@zhangyangyu
Copy link
Member Author

/run-all-tests

@ti-chi-bot ti-chi-bot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label May 26, 2022
@ti-chi-bot ti-chi-bot added the status/LGT1 Indicates that a PR has LGTM 1. label May 26, 2022
@lance6716
Copy link
Contributor

lance6716 commented May 26, 2022

avro codec should use unique key as message key when there is no primary key

we could still try to use a not null unique key

I remember handle key is not a "not null unique key", please check it @3AceShowHand

@zhangyangyu
Copy link
Member Author

avro codec should use unique key as message key when there is no primary key

we could still try to use a not null unique key

I remember handle key is not a "not null unique key", please check it @3AceShowHand

how do you think @leoppro

@codecov-commenter
Copy link

codecov-commenter commented May 26, 2022

Codecov Report

Merging #5601 (69a3b15) into master (fcea4d5) will increase coverage by 0.2313%.
The diff coverage is 60.3972%.

Flag Coverage Δ
cdc 61.4082% <62.1713%> (+0.2601%) ⬆️
dm 51.9832% <56.4728%> (-0.0595%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

@@               Coverage Diff                @@
##             master      #5601        +/-   ##
================================================
+ Coverage   56.0768%   56.3082%   +0.2313%     
================================================
  Files           535        673       +138     
  Lines         70143      78667      +8524     
================================================
+ Hits          39334      44296      +4962     
- Misses        27078      30226      +3148     
- Partials       3731       4145       +414     

@ti-chi-bot ti-chi-bot added status/LGT2 Indicates that a PR has LGTM 2. and removed status/LGT1 Indicates that a PR has LGTM 1. labels May 26, 2022
@liuzix liuzix added require-LGT3 Indicates that the PR requires three LGTM. do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. labels May 26, 2022
@liuzix
Copy link
Contributor

liuzix commented May 26, 2022

There should be an end-to-end test for this issue. Holding for now.

@lance6716
Copy link
Contributor

avro codec should use unique key as message key when there is no primary key

we could still try to use a not null unique key

I remember handle key is not a "not null unique key", please check it @3AceShowHand

how do you think @leoppro

I have checked the code, the HandleKey flag is fine.

@ti-chi-bot ti-chi-bot added status/LGT3 The PR has already had 3 LGTM. and removed status/LGT2 Indicates that a PR has LGTM 2. labels May 26, 2022
@ti-chi-bot ti-chi-bot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels May 26, 2022
@zhangyangyu
Copy link
Member Author

/run-all-tests

@liuzix liuzix removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label May 26, 2022
@liuzix
Copy link
Contributor

liuzix commented May 26, 2022

/merge

@ti-chi-bot
Copy link
Member

This pull request has been accepted and is ready to merge.

Commit hash: 5e10ff5

@ti-chi-bot ti-chi-bot added the status/can-merge Indicates a PR has been approved by a committer. label May 26, 2022
@ti-chi-bot
Copy link
Member

@zhangyangyu: Your PR was out of date, I have automatically updated it for you.

At the same time I will also trigger all tests for you:

/run-all-tests

If the CI test fails, you just re-trigger the test that failed and the bot will merge the PR for you after the CI passes.

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.

@ti-chi-bot ti-chi-bot removed the status/can-merge Indicates a PR has been approved by a committer. label May 26, 2022
@liuzix liuzix added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label May 26, 2022
@zhangyangyu
Copy link
Member Author

/run-all-tests

@lance6716
Copy link
Contributor

/unhold

@ti-chi-bot ti-chi-bot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label May 26, 2022
@liuzix
Copy link
Contributor

liuzix commented May 26, 2022

/merge

@ti-chi-bot
Copy link
Member

This pull request has been accepted and is ready to merge.

Commit hash: 69a3b15

@ti-chi-bot ti-chi-bot added the status/can-merge Indicates a PR has been approved by a committer. label May 26, 2022
@ti-chi-bot ti-chi-bot merged commit 4ed4693 into pingcap:master May 26, 2022
@ti-chi-bot
Copy link
Member

In response to a cherrypick label: new pull request created: #5605.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs-cherry-pick-release-6.1 Should cherry pick this PR to release-6.1 branch. release-note-none Denotes a PR that doesn't merit a release note. require-LGT3 Indicates that the PR requires three LGTM. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. status/can-merge Indicates a PR has been approved by a committer. status/LGT3 The PR has already had 3 LGTM.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

avro codec should use unique key as message key when there is no primary key
8 participants