Revert "Federation backoff fixes and tests (#2792)"

This reverts commit dcedd1b6bf.
This commit is contained in:
Neil Alexander 2022-10-13 16:06:50 +01:00
parent dcedd1b6bf
commit f3be4b3185
No known key found for this signature in database
GPG key ID: A02A2019A2BB0944
5 changed files with 2 additions and 441 deletions

View file

@ -95,8 +95,8 @@ func (s *ServerStatistics) cancel() {
// we will unblacklist it.
func (s *ServerStatistics) Success() {
s.cancel()
s.backoffCount.Store(0)
s.successCounter.Inc()
s.backoffCount.Store(0)
if s.statistics.DB != nil {
if err := s.statistics.DB.RemoveServerFromBlacklist(s.serverName); err != nil {
logrus.WithError(err).Errorf("Failed to remove %q from blacklist", s.serverName)
@ -174,12 +174,6 @@ func (s *ServerStatistics) Blacklisted() bool {
return s.blacklisted.Load()
}
// RemoveBlacklist removes the blacklisted status from the server.
func (s *ServerStatistics) RemoveBlacklist() {
s.cancel()
s.backoffCount.Store(0)
}
// SuccessCount returns the number of successful requests. This is
// usually useful in constructing transaction IDs.
func (s *ServerStatistics) SuccessCount() uint32 {