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

kv/client: fix time is not updated when receiving committed event #1847

Merged
merged 5 commits into from
May 27, 2021

Conversation

amyangfei
Copy link
Contributor

What problem does this PR solve?

Fix a bug in kv client v2 that committed events are not counted in event ts manager

What is changed and how it works?

  • Always send ts update notification to event ts manager when region receives any event and it is not initialized.
  • Remove a failpoint in test case, and we can update global variable directly.

Check List

Tests

  • Unit test
  • Integration test

Release note

  • No release note

@amyangfei amyangfei added type/bugfix This PR fixes a bug. component/kv-client TiKV kv log client component. needs-cherry-pick-release-4.0 Should cherry pick this PR to release-4.0 branch. needs-cherry-pick-release-5.0 Should cherry pick this PR to release-5.0 branch. labels May 26, 2021
@amyangfei amyangfei added this to the v5.0.2 milestone May 26, 2021
@ti-chi-bot ti-chi-bot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label May 26, 2021
@amyangfei
Copy link
Contributor Author

/run-all-tests

@ti-chi-bot ti-chi-bot added the status/LGT1 Indicates that a PR has LGTM 1. label May 26, 2021
@zier-one zier-one removed the status/LGT1 Indicates that a PR has LGTM 1. label May 26, 2021
@ti-chi-bot ti-chi-bot added the status/LGT1 Indicates that a PR has LGTM 1. label May 26, 2021
err = failpoint.Enable("github.com/pingcap/ticdc/cdc/kv/kvClientReconnectInterval", "return(3)")
c.Assert(err, check.IsNil)
originalReconnectInterval := reconnectInterval
reconnectInterval = 3 * time.Second
Copy link
Contributor

Choose a reason for hiding this comment

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

Is it possible for the race detector to complain about this?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

No, the test cases run in sequence. (The original code also changes the global value, but triggered by the failpoint)

@zier-one
Copy link
Contributor

any command to cancel LGTM? /unlgtm

@zier-one
Copy link
Contributor

any command to cancel LGTM? /unlgtm

fine, I have to review this PR ASAP

@amyangfei
Copy link
Contributor Author

/run-unit-tests

@liuzix
Copy link
Contributor

liuzix commented May 26, 2021

/lgtm

@ti-chi-bot
Copy link
Member

[REVIEW NOTIFICATION]

This pull request has been approved by:

  • leoppro
  • liuzix

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 writing /lgtm in a comment.
Reviewer can cancel approval by writing /lgtm cancel in a comment.

@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, 2021
@amyangfei
Copy link
Contributor Author

any command to cancel LGTM? /unlgtm

@leoppro try /lgtm cancel

@codecov-commenter
Copy link

Codecov Report

Merging #1847 (f2b753c) into master (99ee8fb) will increase coverage by 0.2920%.
The diff coverage is 57.4324%.

@@               Coverage Diff                @@
##             master      #1847        +/-   ##
================================================
+ Coverage   53.4083%   53.7004%   +0.2920%     
================================================
  Files           154        157         +3     
  Lines         16166      16309       +143     
================================================
+ Hits           8634       8758       +124     
+ Misses         6608       6603         -5     
- Partials        924        948        +24     

@zier-one
Copy link
Contributor

/lgtm

@amyangfei
Copy link
Contributor Author

/merge

@ti-chi-bot
Copy link
Member

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

Commit hash: f2b753c

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

/merge

@amyangfei
Copy link
Contributor Author

/run-leak-tests
/run-kafka-tests

@amyangfei
Copy link
Contributor Author

/run-all-tests

@amyangfei
Copy link
Contributor Author

/run-leak-tests
/run-integration-tests

@amyangfei
Copy link
Contributor Author

/run-integration-tests

@liuzix
Copy link
Contributor

liuzix commented May 27, 2021

/merge

@amyangfei
Copy link
Contributor Author

/run-kafka-tests

@ti-chi-bot
Copy link
Member

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

ti-chi-bot pushed a commit to ti-chi-bot/tiflow that referenced this pull request May 27, 2021
Signed-off-by: ti-chi-bot <ti-community-prow-bot@tidb.io>
@ti-chi-bot
Copy link
Member

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

@amyangfei amyangfei deleted the fix-event-ts-notify branch June 3, 2021 07:24
amyangfei added a commit to amyangfei/tiflow that referenced this pull request Jun 3, 2021
amyangfei added a commit to amyangfei/tiflow that referenced this pull request Jul 7, 2021
amyangfei added a commit to amyangfei/tiflow that referenced this pull request Jul 7, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component/kv-client TiKV kv log client component. needs-cherry-pick-release-4.0 Should cherry pick this PR to release-4.0 branch. needs-cherry-pick-release-5.0 Should cherry pick this PR to release-5.0 branch. 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. type/bugfix This PR fixes a bug.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants