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

server/join: log detailed info when a join failure member is detected #8243

Merged
merged 1 commit into from
Jun 4, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 10 additions & 2 deletions server/join/join.go
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,11 @@
existed := false
for _, m := range listResp.Members {
if len(m.Name) == 0 {
return errors.New("there is a member that has not joined successfully")
log.Error("there is an abnormal joined member in the current member list",
zap.Uint64("id", m.ID),
zap.Strings("peer-urls", m.PeerURLs),
zap.Strings("client-urls", m.ClientURLs))
return errors.Errorf("there is a member %d that has not joined successfully", m.ID)

Check warning on line 143 in server/join/join.go

View check run for this annotation

Codecov / codecov/patch

server/join/join.go#L139-L143

Added lines #L139 - L143 were not covered by tests
}
if m.Name == cfg.Name {
existed = true
Expand Down Expand Up @@ -184,7 +188,11 @@
listSucc = true
}
if len(n) == 0 {
return errors.New("there is a member that has not joined successfully")
log.Error("there is an abnormal joined member in the current member list",
zap.Uint64("id", memb.ID),
zap.Strings("peer-urls", memb.PeerURLs),
zap.Strings("client-urls", memb.ClientURLs))
return errors.Errorf("there is a member %d that has not joined successfully", memb.ID)

Check warning on line 195 in server/join/join.go

View check run for this annotation

Codecov / codecov/patch

server/join/join.go#L191-L195

Added lines #L191 - L195 were not covered by tests
}
for _, m := range memb.PeerURLs {
pds = append(pds, fmt.Sprintf("%s=%s", n, m))
Expand Down