mirror of
https://github.com/featurebasedb/featurebase.git
synced 2026-10-07 19:37:51 +00:00
check for context deadline exceeded in retry client (#2033)
you can get a context deadline exceeded from clientv3 if there's heavy load and the etcd server sends a grpc code DeadlineExceeded. this causes the etcd client to not retry connecting and then you end up with nodes that can't recover. Co-authored-by: tgruben <tgruben@gmail.com> Co-authored-by: 54mir <48686912+54mir@users.noreply.github.com> Co-authored-by: seebs <seebs@molecula.com> Co-authored-by: tgruben <tgruben@gmail.com> Co-authored-by: 54mir <48686912+54mir@users.noreply.github.com> Co-authored-by: seebs <seebs@molecula.com>
This commit is contained in:
parent
8702fac11d
commit
0e37e04f47
1 changed files with 2 additions and 1 deletions
|
|
@ -225,7 +225,8 @@ func (e *Etcd) retryClient(fn func(cli *clientv3.Client) error) (err error) {
|
|||
cli = e.newClient(cli)
|
||||
break
|
||||
}
|
||||
if !strings.Contains(msg, "etcdserver: request timed out") {
|
||||
// check that the request hasn't timed out. this can happen with either of these errors
|
||||
if !strings.Contains(msg, "etcdserver: request timed out") && !strings.Contains(msg, "context deadline exceeded") {
|
||||
// not a known error, also not a wrapped timeout
|
||||
return errors.Wrap(err, "non-retryable error")
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue