-
Notifications
You must be signed in to change notification settings - Fork 725
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
fix scatter range receive npe when get store info of non-eixst store #1439
Conversation
Hi contributor, thanks for your PR. This patch needs to be approved by someone of admins. They should reply with "/ok-to-test" to accept this PR for running test automatically. |
1 similar comment
Hi contributor, thanks for your PR. This patch needs to be approved by someone of admins. They should reply with "/ok-to-test" to accept this PR for running test automatically. |
Codecov Report
@@ Coverage Diff @@
## master #1439 +/- ##
=========================================
Coverage ? 67.73%
=========================================
Files ? 158
Lines ? 15182
Branches ? 0
=========================================
Hits ? 10283
Misses ? 3978
Partials ? 921
Continue to review full report at Codecov.
|
Thank you @lerencao |
how can we meet this? seem we need to add a test. |
after pd server restarts, not all region infos are updated, and region info's default store id is 0. |
@lerencao can you add this situation in the test? |
@nolouch Yes, will work on it. |
3cd3fde
to
e951fcb
Compare
@nolouch PTAL Test cases and another nil check are added |
@lerencao ci failed, may related to |
e951fcb
to
8048c95
Compare
@nolouch updated. |
tc.Regions.SetRegion(regionInfo) | ||
} | ||
|
||
for i := 1; i <= 3; i++ { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It seems we don't need it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe the store info is not used in the underlining implementations, but it should be here to make things straight.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
What problem does this PR solve?
Fix a npe when get store info of a non-exist stores in scatter range
What is changed and how it works?
We got a stack error in our online env.
Check List
Tests
Related changes