mirror of
https://github.com/featurebasedb/featurebase.git
synced 2026-10-08 03:47:51 +00:00
more info if nodeleave confirmation queries fail
This commit is contained in:
parent
fe83ef59c7
commit
481c85acae
1 changed files with 4 additions and 2 deletions
|
|
@ -1709,15 +1709,17 @@ func confirmNodeDown(uri URI, log logger.Logger) bool {
|
|||
log.Printf("bad request:%s %s", u.String(), err)
|
||||
return false
|
||||
}
|
||||
|
||||
for i := 0; i < confirmDownRetries; i++ {
|
||||
resp, err := http.DefaultClient.Do(req.WithContext(ctx))
|
||||
var bod []byte
|
||||
if err == nil {
|
||||
bod, err = ioutil.ReadAll(resp.Body)
|
||||
if resp.StatusCode == 200 {
|
||||
return false
|
||||
}
|
||||
}
|
||||
log.Printf("NodeLeave Timeout with %s %d", uri.HostPort(), i)
|
||||
|
||||
log.Printf("NodeLeave confirm with %s %d. err: '%v' bod: '%s'", uri.HostPort(), i, err, bod)
|
||||
time.Sleep(confirmDownSleep * time.Second)
|
||||
}
|
||||
return true
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue