vesoft-inc / nebula-java

Client API and data importer of Nebula Graph in Java
Apache License 2.0
171 stars 121 forks source link

fix the leader state for CANDIDATE meta role #502

Closed Nicole00 closed 1 year ago

Nicole00 commented 1 year ago

What type of PR is this?

What problem(s) does this PR solve?

Issue(s) number:

fix https://github.com/vesoft-inc/nebula-java/issues/409

Description:

How do you solve it?

When the leader host in response is empty, then fresh the meta client with input addresses. When the leader host is not empty, just use the leader host to update the meta client.

Special notes for your reviewer, ex. impact of this fix, design document, etc:

codecov-commenter commented 1 year ago

Codecov Report

Base: 63.46% // Head: 63.72% // Increases project coverage by +0.25% :tada:

Coverage data is based on head (e904e37) compared to base (e25c56d). Patch coverage: 33.33% of modified lines in pull request are covered.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #502 +/- ## ============================================ + Coverage 63.46% 63.72% +0.25% - Complexity 787 792 +5 ============================================ Files 71 71 Lines 3758 3760 +2 Branches 537 538 +1 ============================================ + Hits 2385 2396 +11 + Misses 1004 998 -6 + Partials 369 366 -3 ``` | [Impacted Files](https://codecov.io/gh/vesoft-inc/nebula-java/pull/502?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=vesoft-inc) | Coverage Δ | | |---|---|---| | [...java/com/vesoft/nebula/client/meta/MetaClient.java](https://codecov.io/gh/vesoft-inc/nebula-java/pull/502/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=vesoft-inc#diff-Y2xpZW50L3NyYy9tYWluL2phdmEvY29tL3Zlc29mdC9uZWJ1bGEvY2xpZW50L21ldGEvTWV0YUNsaWVudC5qYXZh) | `57.14% <33.33%> (+4.25%)` | :arrow_up: | | [...va/com/vesoft/nebula/client/graph/SessionPool.java](https://codecov.io/gh/vesoft-inc/nebula-java/pull/502/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=vesoft-inc#diff-Y2xpZW50L3NyYy9tYWluL2phdmEvY29tL3Zlc29mdC9uZWJ1bGEvY2xpZW50L2dyYXBoL1Nlc3Npb25Qb29sLmphdmE=) | `58.19% <0.00%> (+0.56%)` | :arrow_up: | Help us with your feedback. Take ten seconds to tell us [how you rate us](https://about.codecov.io/nps?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=vesoft-inc). Have a feature suggestion? [Share it here.](https://app.codecov.io/gh/feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=vesoft-inc)

:umbrella: View full report at Codecov.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.