-
Notifications
You must be signed in to change notification settings - Fork 29
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
V0.8.0 #67
V0.8.0 #67
Conversation
do we need update README and other doc's nebula version to 2.5.0? |
pkg/nebula/meta_client.go
Outdated
@@ -118,7 +118,7 @@ func (m *metaClient) GetSpace(spaceName string) (*meta.SpaceItem, error) { | |||
if err != nil { | |||
return nil, err | |||
} | |||
if resp.Code != meta.ErrorCode_SUCCEEDED { | |||
if resp.Code != nebula.ErrorCode_E_DISCONNECTED { |
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.
ErrorCode_E_DISCONNECTED
= > ErrorCode_SUCCEEDED
?
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.
Fixed
leader := fmt.Sprintf("%s:%v", resp.Result_.FailedParts[0].Leader.Host, resp.Result_.FailedParts[0].Leader.Port) | ||
if err := s.updateClient(leader); err != nil { | ||
return err | ||
} | ||
resp, err := s.client.TransLeader(req) | ||
if err != nil { | ||
log.Error(err, "TransLeader failed") | ||
return err | ||
} | ||
log.Info("TransLeader returned") | ||
if len(resp.Result_.FailedParts) > 0 { | ||
return errors.Errorf("Trans leader failed") | ||
} | ||
return nil | ||
} else if resp.Result_.FailedParts[0].Code == storage.ErrorCode_E_LEADER_CHANGED { | ||
return errors.Errorf("leader changed, please request to leader") |
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 remove the logic about ErrorCode_E_LEADER_CHANGED
?
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.
These codes are unused
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
No description provided.