aboutsummaryrefslogtreecommitdiff
path: root/federationapi/statistics
diff options
context:
space:
mode:
authorNeil Alexander <neilalexander@users.noreply.github.com>2022-10-13 16:06:50 +0100
committerNeil Alexander <neilalexander@users.noreply.github.com>2022-10-13 16:06:50 +0100
commitf3be4b31850add1a33c932aa3fa7b0bb740554f2 (patch)
treed1a03b1be93f55fffc799bf395be9ba7ccf7b3da /federationapi/statistics
parentdcedd1b6bf1e890ff425bdf1fcd8a2e0850778b5 (diff)
Revert "Federation backoff fixes and tests (#2792)"
This reverts commit dcedd1b6bf1e890ff425bdf1fcd8a2e0850778b5.
Diffstat (limited to 'federationapi/statistics')
-rw-r--r--federationapi/statistics/statistics.go8
1 files changed, 1 insertions, 7 deletions
diff --git a/federationapi/statistics/statistics.go b/federationapi/statistics/statistics.go
index 61a96579..db6d5c73 100644
--- a/federationapi/statistics/statistics.go
+++ b/federationapi/statistics/statistics.go
@@ -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 {