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

Clarify message of overloaded pending proposals for live loader. #2732

Merged
merged 2 commits into from
Nov 9, 2018
Merged
Show file tree
Hide file tree
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
4 changes: 2 additions & 2 deletions dgraph/cmd/live/batch.go
Original file line number Diff line number Diff line change
Expand Up @@ -140,9 +140,9 @@ func handleError(err error) {
x.Fatalf(s.Message())
case strings.Contains(s.Message(), "x509"):
x.Fatalf(s.Message())
case strings.Contains(s.Message(), "Server unavailable."):
case strings.Contains(s.Message(), "Server overloaded."):
dur := time.Duration(1+rand.Intn(10)) * time.Minute
fmt.Printf("Server is unavailable. Will retry after %s.", dur.Round(time.Minute))
fmt.Printf("Server is overloaded. Will retry after %s.", dur.Round(time.Minute))
time.Sleep(dur)
case err != y.ErrAborted && err != y.ErrConflict:
fmt.Printf("Error while mutating %v\n", s.Message())
Expand Down
2 changes: 1 addition & 1 deletion worker/proposal.go
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ func (rl *rateLimiter) decr(retry int) {
}

var errInternalRetry = errors.New("Retry Raft proposal internally")
var errUnableToServe = errors.New("Server unavailable. Please retry later")
var errUnableToServe = errors.New("Server overloaded with pending proposals. Please retry later.")

// proposeAndWait sends a proposal through RAFT. It waits on a channel for the proposal
// to be applied(written to WAL) to all the nodes in the group.
Expand Down