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

cdc: fix old value config glitch when changefeeds with different settings connect to one region #9515

Merged
merged 3 commits into from
Jan 22, 2021

Conversation

liuzix
Copy link
Contributor

@liuzix liuzix commented Jan 18, 2021

What problem does this PR solve?

Problem Summary:
When two TiCDC changefeeds connect to the same region, but one changefeed requires old value but the other doesn't, the one that doesn't need old value still receives old value.

What is changed and how it works?

What's Changed: Now we record the old value setting in each Downstream and filters the old value appropriately before sinking the events.

Related changes

  • Need to cherry-pick to the release branch

Check List

Tests

  • Unit test

Release note

  • Fix old value config glitch when changefeeds with different settings connect to one region

Signed-off-by: Zixiong Liu <[email protected]>
@ti-srebot ti-srebot added the first-time-contributor Indicates that the PR was contributed by an external member and is a first-time contributor. label Jan 18, 2021
@ti-chi-bot ti-chi-bot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Jan 18, 2021
@liuzix liuzix force-pushed the zixiong-fix-old-value branch from ebf9ab1 to a2cc5ce Compare January 18, 2021 03:44
let mut event_count = 0;
loop {
let events = receive_event_1(false).events.to_vec();
println!("test_old_value_multi_changefeeds: 3");
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please remove these println

@5kbpers
Copy link
Member

5kbpers commented Jan 18, 2021

/lgtm

@ti-chi-bot ti-chi-bot added the status/LGT1 Indicates that a PR has LGTM 1. label Jan 18, 2021
@overvenus overvenus added the component/CDC Component: Change Data Capture label Jan 19, 2021
Copy link

@amyangfei amyangfei left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@ti-chi-bot
Copy link
Member

@amyangfei: Please use /LGTM instead of LGTM when you want to approve the pull request by comment.

If you use the GitHub review feature, please approve the PR directly, the comment will not take effect in the GitHub review feature.

If you have any qustions please refer to lgtm command help or lgtm plugin design.

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.

@amyangfei
Copy link

/lgtm

@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 Jan 20, 2021
@5kbpers
Copy link
Member

5kbpers commented Jan 22, 2021

/merge

@ti-chi-bot
Copy link
Member

@5kbpers: It seems you want to merge this PR, I will help you trigger all the tests:

/run-all-tests

You only need to trigger /merge once, and 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.

If you have any questions about the PR merge process, please refer to pr process.

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
Copy link
Member

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

Commit hash: 15f3291

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

@liuzix: Your PR has out-of-dated, I have automatically updated it for you.

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

/run-all-tests

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 merged commit 927e36f into tikv:master Jan 22, 2021
@5kbpers 5kbpers added the needs-cherry-pick-release-4.0 Type: Need cherry pick to release 4.0 label Jan 25, 2021
@5kbpers
Copy link
Member

5kbpers commented Jan 25, 2021

/run-cherry-picker

@ti-srebot
Copy link
Contributor

cherry pick to release-4.0 in PR #9565

ti-chi-bot pushed a commit that referenced this pull request Jan 28, 2021
…ings connect to one region (#9515) (#9565)

cherry-pick #9515 to release-4.0
You can switch your code base to this Pull Request by using [git-extras](https://github.com/tj/git-extras):
```bash
# In tikv repo:
git pr #9565
```

After apply modifications, you can push your change to this PR via:
```bash
git push [email protected]:ti-srebot/tikv.git pr/9565:release-4.0-927e36f952f8
```

---

<!--
Thank you for contributing to TiKV!

If you haven't already, please read TiKV's [CONTRIBUTING](https://github.com/tikv/tikv/blob/master/CONTRIBUTING.md) document.

If you're unsure about anything, just ask; somebody should be along to answer within a day or two.

PR Title Format:
1. module [, module2, module3]: what's changed
2. *: what's changed

If you want to open the **Challenge Program** pull request, please use the following template:
https://raw.githubusercontent.com/tikv/.github/master/.github/PULL_REQUEST_TEMPLATE/challenge-program.md
You can use it with query parameters: https://github.com/tikv/tikv/compare/master...${you branch}?template=challenge-program.md
-->

### What problem does this PR solve?

Problem Summary:
When two TiCDC changefeeds connect to the same region, but one changefeed requires old value but the other doesn't, the one that doesn't need old value still receives old value.

### What is changed and how it works?

What's Changed: Now we record the old value setting in each `Downstream` and filters the old value appropriately before sinking the events. 

### Related changes

- Need to cherry-pick to the release branch

### Check List <!--REMOVE the items that are not applicable-->

Tests <!-- At least one of them must be included. -->

- Unit test


### Release note <!-- bugfixes or new feature need a release note -->
- Fix old value config glitch when changefeeds with different settings connect to one region
gengliqi pushed a commit to gengliqi/tikv that referenced this pull request Feb 20, 2021
…ings connect to one region (tikv#9515) (tikv#9565)

cherry-pick tikv#9515 to release-4.0
You can switch your code base to this Pull Request by using [git-extras](https://github.com/tj/git-extras):
```bash
# In tikv repo:
git pr tikv#9565
```

After apply modifications, you can push your change to this PR via:
```bash
git push [email protected]:ti-srebot/tikv.git pr/9565:release-4.0-927e36f952f8
```

---

<!--
Thank you for contributing to TiKV!

If you haven't already, please read TiKV's [CONTRIBUTING](https://github.com/tikv/tikv/blob/master/CONTRIBUTING.md) document.

If you're unsure about anything, just ask; somebody should be along to answer within a day or two.

PR Title Format:
1. module [, module2, module3]: what's changed
2. *: what's changed

If you want to open the **Challenge Program** pull request, please use the following template:
https://raw.githubusercontent.com/tikv/.github/master/.github/PULL_REQUEST_TEMPLATE/challenge-program.md
You can use it with query parameters: https://github.com/tikv/tikv/compare/master...${you branch}?template=challenge-program.md
-->

### What problem does this PR solve?

Problem Summary:
When two TiCDC changefeeds connect to the same region, but one changefeed requires old value but the other doesn't, the one that doesn't need old value still receives old value.

### What is changed and how it works?

What's Changed: Now we record the old value setting in each `Downstream` and filters the old value appropriately before sinking the events. 

### Related changes

- Need to cherry-pick to the release branch

### Check List <!--REMOVE the items that are not applicable-->

Tests <!-- At least one of them must be included. -->

- Unit test


### Release note <!-- bugfixes or new feature need a release note -->
- Fix old value config glitch when changefeeds with different settings connect to one region
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component/CDC Component: Change Data Capture first-time-contributor Indicates that the PR was contributed by an external member and is a first-time contributor. needs-cherry-pick-release-4.0 Type: Need cherry pick to release 4.0 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/LGT2 Indicates that a PR has LGTM 2.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants