Skip to content
Snippets Groups Projects
Commit bf6a100e authored by Jake Taylor's avatar Jake Taylor :lips:
Browse files

Hotfix/renable historical

parent f613a8f1
No related branches found
No related tags found
2 merge requests!231Revert "Update store to print changes to the partners list",!174Hotfix/renable historical
......@@ -16,7 +16,7 @@ require (
gitlab.com/elixxir/crypto v0.0.7-0.20220222221347-95c7ae58da6b
gitlab.com/elixxir/ekv v0.1.6
gitlab.com/elixxir/primitives v0.0.3-0.20220222212109-d412a6e46623
gitlab.com/xx_network/comms v0.0.4-0.20220222212058-5a37737af57e
gitlab.com/xx_network/comms v0.0.4-0.20220223204319-1a310472e098
gitlab.com/xx_network/crypto v0.0.5-0.20220222212031-750f7e8a01f4
gitlab.com/xx_network/primitives v0.0.4-0.20220222211843-901fa4a2d72b
golang.org/x/crypto v0.0.0-20220128200615-198e4374d7ed
......
......@@ -287,8 +287,9 @@ gitlab.com/elixxir/primitives v0.0.1/go.mod h1:kNp47yPqja2lHSiS4DddTvFpB/4D9dB2Y
gitlab.com/elixxir/primitives v0.0.3-0.20220222212109-d412a6e46623 h1:NzJ06KdJd3fVJee0QvGhNr3CO+Ki8Ea1PeakZsm+rZM=
gitlab.com/elixxir/primitives v0.0.3-0.20220222212109-d412a6e46623/go.mod h1:MtFIyJUQn9P7djzVlBpEYkPNnnWFTjZvw89swoXY+QM=
gitlab.com/xx_network/comms v0.0.0-20200805174823-841427dd5023/go.mod h1:owEcxTRl7gsoM8c3RQ5KAm5GstxrJp5tn+6JfQ4z5Hw=
gitlab.com/xx_network/comms v0.0.4-0.20220222212058-5a37737af57e h1:PrQoTQoA6be4J+Lr/AclebS5Gz0Zm/TYC5b44qWa1PU=
gitlab.com/xx_network/comms v0.0.4-0.20220222212058-5a37737af57e/go.mod h1:isHnwem0v4rTcwwHP455FhVlFyPcHkHiVz+N3s/uCSI=
gitlab.com/xx_network/comms v0.0.4-0.20220223204319-1a310472e098 h1:wGXXG3m65GpzmWmumLak5dn6Sm75iAF7qlx5uz81+Pg=
gitlab.com/xx_network/comms v0.0.4-0.20220223204319-1a310472e098/go.mod h1:isHnwem0v4rTcwwHP455FhVlFyPcHkHiVz+N3s/uCSI=
gitlab.com/xx_network/crypto v0.0.3/go.mod h1:DF2HYvvCw9wkBybXcXAgQMzX+MiGbFPjwt3t17VRqRE=
gitlab.com/xx_network/crypto v0.0.4/go.mod h1:+lcQEy+Th4eswFgQDwT0EXKp4AXrlubxalwQFH5O0Mk=
gitlab.com/xx_network/crypto v0.0.5-0.20220222212031-750f7e8a01f4 h1:95dZDMn/hpLNwsgZO9eyQgGKaSDyh6F6+WygqZIciww=
......
......@@ -39,7 +39,7 @@ func GetDefaultCMIX() CMIX {
Timeout: 25 * time.Second,
RetryDelay: 1 * time.Second,
SendTimeout: 3 * time.Second,
DebugTag: "External",
DebugTag: "External",
}
}
......
......@@ -60,7 +60,7 @@ func GetDefaultRounds() Rounds {
MaxHistoricalRoundsRetries: 3,
UncheckRoundPeriod: 20 * time.Second,
ForceMessagePickupRetry: false,
SendTimeout: 1 * time.Second,
RealtimeOnly: false,
SendTimeout: 3 * time.Second,
RealtimeOnly: false,
}
}
......@@ -91,11 +91,12 @@ func DefaultPoolParams() PoolParams {
HostParams: connect.GetDefaultHostParams(),
}
p.HostParams.MaxRetries = 1
p.HostParams.MaxSendRetries = 1
p.HostParams.AuthEnabled = false
p.HostParams.EnableCoolOff = false
p.HostParams.NumSendsBeforeCoolOff = 1
p.HostParams.CoolOffTimeout = 5 * time.Minute
p.HostParams.SendTimeout = 2000 * time.Millisecond
p.HostParams.SendTimeout = 1 * time.Second
p.HostParams.PingTimeout = 1 * time.Second
return p
}
......
......@@ -51,34 +51,26 @@ func (s *Sender) SendToAny(sendFunc func(host *connect.Host) (interface{}, error
return nil, errors.Errorf(stoppable.ErrMsg, stop.Name(), "SendToAny")
} else if err == nil {
return result, nil
} else if strings.Contains(err.Error(), RetryableError) {
// Retry of the proxy could not communicate
jww.INFO.Printf("Unable to SendToAny via %s: non-fatal error received, retrying: %s",
proxies[proxy].GetId().String(), err)
continue
} else if strings.Contains(err.Error(), "unable to connect to target host") ||
strings.Contains(err.Error(), "unable to find target host") {
// Retry of the proxy could not communicate
jww.WARN.Printf("Unable to SendToAny via %s: %s,"+
" proxy could not contact requested host",
proxies[proxy].GetId(), err)
continue
}
// Not retryable, now we must check whether the Host should be replaced
replaced, checkReplaceErr := s.checkReplace(proxies[proxy].GetId(), err)
if replaced {
jww.WARN.Printf("Unable to SendToAny, replaced a proxy %s with error %s",
proxies[proxy].GetId().String(), err.Error())
} else {
if checkReplaceErr != nil {
jww.WARN.Printf("Unable to SendToAny via %s: %s. Unable to replace host: %+v",
proxies[proxy].GetId().String(), err.Error(), checkReplaceErr)
} else {
jww.WARN.Printf("Unable to SendToAny via %s: %s. Did not replace host.",
// Now we must check whether the Host should be replaced
replaced, checkReplaceErr := s.checkReplace(proxies[proxy].GetId(), err)
if replaced {
jww.WARN.Printf("Unable to SendToAny, replaced a proxy %s with error %s",
proxies[proxy].GetId().String(), err.Error())
} else {
if checkReplaceErr != nil {
jww.WARN.Printf("Unable to SendToAny via %s: %s. Unable to replace host: %+v",
proxies[proxy].GetId().String(), err.Error(), checkReplaceErr)
} else {
jww.WARN.Printf("Unable to SendToAny via %s: %s. Did not replace host.",
proxies[proxy].GetId().String(), err.Error())
}
}
// End for non-retryable errors
if !strings.Contains(err.Error(), RetryableError) {
return nil, errors.WithMessage(err, "Received error with SendToAny")
}
return nil, errors.WithMessage(err, "Received error with SendToAny")
}
}
......@@ -114,34 +106,26 @@ func (s *Sender) SendToPreferred(targets []*id.ID, sendFunc sendToPreferredFunc,
return nil, errors.Errorf(stoppable.ErrMsg, stop.Name(), "SendToPreferred")
} else if err == nil {
return result, nil
} else if strings.Contains(err.Error(), RetryableError) {
// Retry of the proxy could not communicate
jww.INFO.Printf("Unable to to SendToPreferred first pass %s via %s: non-fatal error received, retrying: %s",
targets[i], targetHosts[i].GetId(), err)
continue
} else if strings.Contains(err.Error(), "unable to connect to target host") ||
strings.Contains(err.Error(), "unable to find target host") {
// Retry of the proxy could not communicate
jww.WARN.Printf("Unable to SendToPreferred first pass %s via %s: %s, "+
"proxy could not contact requested host",
targets[i], targetHosts[i].GetId(), err)
continue
}
// Not retryable, now we must check whether the Host should be replaced
replaced, checkReplaceErr := s.checkReplace(targetHosts[i].GetId(), err)
if replaced {
jww.WARN.Printf("Unable to SendToPreferred first pass via %s, replaced a proxy %s with error %s",
targets[i], targetHosts[i].GetId(), err.Error())
} else {
if checkReplaceErr != nil {
jww.WARN.Printf("Unable to SendToPreferred first pass %s via %s: %s. Unable to replace host: %+v",
targets[i], targetHosts[i].GetId(), err.Error(), checkReplaceErr)
} else {
jww.WARN.Printf("Unable to SendToPreferred first pass %s via %s: %s. Did not replace host.",
// Now we must check whether the Host should be replaced
replaced, checkReplaceErr := s.checkReplace(targetHosts[i].GetId(), err)
if replaced {
jww.WARN.Printf("Unable to SendToPreferred first pass via %s, replaced a proxy %s with error %s",
targets[i], targetHosts[i].GetId(), err.Error())
} else {
if checkReplaceErr != nil {
jww.WARN.Printf("Unable to SendToPreferred first pass %s via %s: %s. Unable to replace host: %+v",
targets[i], targetHosts[i].GetId(), err.Error(), checkReplaceErr)
} else {
jww.WARN.Printf("Unable to SendToPreferred first pass %s via %s: %s. Did not replace host.",
targets[i], targetHosts[i].GetId(), err.Error())
}
}
// End for non-retryable errors
if !strings.Contains(err.Error(), RetryableError) {
return nil, errors.WithMessage(err, "Received error with SendToPreferred")
}
return result, err
}
}
......@@ -190,30 +174,29 @@ func (s *Sender) SendToPreferred(targets []*id.ID, sendFunc sendToPreferredFunc,
jww.INFO.Printf("Unable to SendToPreferred second pass %s via %s: non-fatal error received, retrying: %s",
target, proxy, err)
continue
} else if strings.Contains(err.Error(), "unable to connect to target host") ||
strings.Contains(err.Error(), "unable to find target host") {
// Retry of the proxy could not communicate
jww.WARN.Printf("Unable to SendToPreferred second pass %s via %s: %s,"+
" proxy could not contact requested host",
target, proxy, err)
continue
}
// Not retryable, now we must check whether the Host should be replaced
replaced, checkReplaceErr := s.checkReplace(proxy.GetId(), err)
badProxies[proxy.String()] = nil
if replaced {
jww.WARN.Printf("Unable to SendToPreferred second pass via %s, replaced a proxy %s with error %s",
target, proxy.GetId(), err.Error())
} else if err == nil {
return result, nil
} else {
if checkReplaceErr != nil {
jww.WARN.Printf("Unable to SendToPreferred second pass %s via %s: %s. Unable to replace host: %+v",
target, proxy.GetId(), err.Error(), checkReplaceErr)
} else {
jww.WARN.Printf("Unable to SendToPreferred second pass %s via %s: %s. Did not replace host.",
// Now we must check whether the Host should be replaced
replaced, checkReplaceErr := s.checkReplace(proxy.GetId(), err)
badProxies[proxy.String()] = nil
if replaced {
jww.WARN.Printf("Unable to SendToPreferred second pass via %s, replaced a proxy %s with error %s",
target, proxy.GetId(), err.Error())
} else {
if checkReplaceErr != nil {
jww.WARN.Printf("Unable to SendToPreferred second pass %s via %s: %s. Unable to replace host: %+v",
target, proxy.GetId(), err.Error(), checkReplaceErr)
} else {
jww.WARN.Printf("Unable to SendToPreferred second pass %s via %s: %s. Did not replace host.",
target, proxy.GetId(), err.Error())
}
}
// End for non-retryable errors
if !strings.Contains(err.Error(), RetryableError) {
return nil, errors.WithMessage(err, "Received error with SendToPreferred")
}
return result, err
}
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment