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

*: refactor store info #6830

Merged
merged 5 commits into from
May 28, 2024
Merged

*: refactor store info #6830

merged 5 commits into from
May 28, 2024

Conversation

rleungx
Copy link
Member

@rleungx rleungx commented Jul 21, 2023

What problem does this PR solve?

Issue Number: Ref #7897

What is changed and how does it work?

Check List

Tests

  • Unit test

Release note

None.

@ti-chi-bot
Copy link
Contributor

ti-chi-bot bot commented Jul 21, 2023

[REVIEW NOTIFICATION]

This pull request has been approved by:

  • JmPotato
  • nolouch

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

ti-chi-bot bot commented Jul 21, 2023

Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all

@ti-chi-bot ti-chi-bot bot added do-not-merge/needs-linked-issue release-note-none Denotes a PR that doesn't merit a release note. do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. labels Jul 21, 2023
@ti-chi-bot ti-chi-bot bot requested review from JmPotato and lhy1024 July 21, 2023 08:34
@codecov
Copy link

codecov bot commented Jul 21, 2023

Codecov Report

Attention: Patch coverage is 90.06623% with 15 lines in your changes are missing coverage. Please review.

Project coverage is 77.31%. Comparing base (9d580d0) to head (a0f722f).

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #6830      +/-   ##
==========================================
- Coverage   77.38%   77.31%   -0.07%     
==========================================
  Files         471      471              
  Lines       61457    61317     -140     
==========================================
- Hits        47557    47407     -150     
- Misses      10338    10347       +9     
- Partials     3562     3563       +1     
Flag Coverage Δ
unittests 77.31% <90.06%> (-0.07%) ⬇️

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

@ti-chi-bot ti-chi-bot bot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Aug 8, 2023
@ti-chi-bot ti-chi-bot bot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Apr 22, 2024
@rleungx rleungx marked this pull request as ready for review April 22, 2024 06:05
@ti-chi-bot ti-chi-bot bot added do-not-merge/needs-triage-completed and removed do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. labels Apr 22, 2024
@rleungx rleungx requested a review from nolouch April 22, 2024 06:16
@ti-chi-bot ti-chi-bot bot added needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. and removed do-not-merge/needs-linked-issue do-not-merge/needs-triage-completed labels Apr 22, 2024
Copy link
Contributor

ti-chi-bot bot commented Apr 24, 2024

PR needs rebase.

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 kubernetes/test-infra repository.

@rleungx rleungx removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label May 10, 2024
@ti-chi-bot ti-chi-bot bot added the status/LGT1 Indicates that a PR has LGTM 1. label May 10, 2024
bc.Stores.mu.RLock()
defer bc.Stores.mu.RUnlock()
return bc.Stores.GetStore(region.GetLeader().GetStoreId())
return bc.StoresInfo.GetStore(region.GetLeader().GetStoreId())
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
return bc.StoresInfo.GetStore(region.GetLeader().GetStoreId())
return bc.GetStore(region.GetLeader().GetStoreId())

func (s *StoresInfo) GetFollowerStores(region *RegionInfo) []*StoreInfo {
s.RLock()
defer s.RUnlock()
var Stores []*StoreInfo
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
var Stores []*StoreInfo
var stores []*StoreInfo

func (s *StoresInfo) GetRegionStores(region *RegionInfo) []*StoreInfo {
s.RLock()
defer s.RUnlock()
var Stores []*StoreInfo
Copy link
Member

Choose a reason for hiding this comment

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

Ditto.

Signed-off-by: Ryan Leung <[email protected]>
Signed-off-by: Ryan Leung <[email protected]>
Signed-off-by: Ryan Leung <[email protected]>
Signed-off-by: Ryan Leung <[email protected]>
@ti-chi-bot ti-chi-bot bot added status/LGT2 Indicates that a PR has LGTM 2. and removed status/LGT1 Indicates that a PR has LGTM 1. labels May 28, 2024
@JmPotato
Copy link
Member

/merge

Copy link
Contributor

ti-chi-bot bot commented May 28, 2024

@JmPotato: 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.

Copy link
Contributor

ti-chi-bot bot commented May 28, 2024

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

Commit hash: 83a6ee8

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

ti-chi-bot bot commented May 28, 2024

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

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 bot merged commit 5eb66e0 into tikv:master May 28, 2024
19 checks passed
@rleungx rleungx deleted the refactor-store-lock branch May 28, 2024 06:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release-note-none Denotes a PR that doesn't merit a release note. size/XXL Denotes a PR that changes 1000+ 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.

3 participants