-
Notifications
You must be signed in to change notification settings - Fork 71
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
provide metaClient #275
base: master
Are you sure you want to change the base?
provide metaClient #275
Conversation
bb10ee7
to
a0bf908
Compare
Codecov ReportPatch coverage:
❗ Your organization is not using the GitHub App Integration. As a result you may experience degraded service beginning May 15th. Please install the Github App Integration for your organization. Read more. Additional details and impacted files@@ Coverage Diff @@
## master #275 +/- ##
==========================================
- Coverage 62.12% 60.82% -1.31%
==========================================
Files 9 10 +1
Lines 2305 2583 +278
==========================================
+ Hits 1432 1571 +139
- Misses 734 843 +109
- Partials 139 169 +30
☔ View full report in Codecov by Sentry. |
if resp.GetCode() == nebula.ErrorCode_SUCCEEDED { | ||
var spaces []string | ||
for _, name := range resp.GetSpaces() { | ||
spaces = append(spaces, string(name.GetName())) | ||
} | ||
return spaces, nil | ||
} else { | ||
return nil, fmt.Errorf("GetSpaces failed, code:%s", resp.GetCode()) | ||
} | ||
} |
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.
How about return error first to reduce netsting else statement?
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.
How about return error first to reduce netsting else statement?
good idea, will change it.
- --meta_server_addrs=metad0:45500,metad1:45500,metad2:45500 | ||
- --local_ip=metad0 | ||
- --ws_ip=metad0 | ||
- --meta_server_addrs=172.28.1.1:45500,172.28.1.2:45500,172.28.1.3:45500 |
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.
why change theses addresses
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.
why change theses addresses
Because only the meta leader can return correct response. For client, it does not know the leader address, so client random chose one meta server addrs, when this addr is not leader, then client get the real leader from response and re-connect and re-execute.
So we should expose all the meta server address, or it will throw error for connection refused
add meta client to support the storage client.
related issue:#276