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: use multiple sync.Map to reduce lock contention (#1439) #1476

Merged
merged 1 commit into from Mar 3, 2021

Conversation

ti-srebot
Copy link
Contributor

@ti-srebot ti-srebot commented Mar 2, 2021

cherry-pick #1439 to release-4.0
You can switch your code base to this Pull Request by using git-extras:

# In ticdc repo:
git pr https://github.com/pingcap/ticdc/pull/1476

After apply modifications, you can push your change to this PR via:

git push git@github.com:ti-srebot/ticdc.git pr/1476:release-4.0-355016c0ee9d

What problem does this PR solve?

part 3 of #1393, please review this PR after #1426 is merged

What is changed and how it works?

  • Use multiple sync.Maps for regionFeedState get/put operation.
  • The bucket size of sync.Map pool is determined by cpu number, min threshold, and max threshold

Check List

Tests

  • Unit test
  • Integration test

Release note

  • No release note

Signed-off-by: ti-srebot <ti-srebot@pingcap.com>
@ti-srebot
Copy link
Contributor Author

/run-all-tests

@ti-srebot ti-srebot added component/kv-client TiKV kv log client component. status/ptal Could you please take a look? type/4.0-cherry-pick labels Mar 2, 2021
@ti-srebot ti-srebot requested a review from zier-one March 2, 2021 14:49
@ti-srebot ti-srebot added this to the v4.0.12 milestone Mar 2, 2021
@ti-srebot ti-srebot added the status/LGT1 Indicates that a PR has LGTM 1. label Mar 3, 2021
@amyangfei
Copy link
Contributor

/merge

@ti-srebot ti-srebot added the status/can-merge Indicates a PR has been approved by a committer. label Mar 3, 2021
@ti-srebot
Copy link
Contributor Author

/run-all-tests

@ti-srebot ti-srebot merged commit 46fe052 into pingcap:release-4.0 Mar 3, 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. status/can-merge Indicates a PR has been approved by a committer. status/LGT1 Indicates that a PR has LGTM 1. status/ptal Could you please take a look?
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants