diff options
Diffstat (limited to 'internal')
-rw-r--r-- | internal/praefect/nodes/local_elector.go | 6 | ||||
-rw-r--r-- | internal/praefect/nodes/manager.go | 3 | ||||
-rw-r--r-- | internal/praefect/nodes/sql_elector.go | 5 |
3 files changed, 13 insertions, 1 deletions
diff --git a/internal/praefect/nodes/local_elector.go b/internal/praefect/nodes/local_elector.go index bea1ef68b..95c2c3f35 100644 --- a/internal/praefect/nodes/local_elector.go +++ b/internal/praefect/nodes/local_elector.go @@ -52,7 +52,11 @@ func (s *localElector) bootstrap(d time.Duration) { <-timer.C ctx := context.TODO() - s.checkNodes(ctx) + + if err := s.checkNodes(ctx); err != nil { + s.log.WithError(err).Warn("error checking nodes") + } + timer.Reset(d) } } diff --git a/internal/praefect/nodes/manager.go b/internal/praefect/nodes/manager.go index f7578cfbf..e57abeb0b 100644 --- a/internal/praefect/nodes/manager.go +++ b/internal/praefect/nodes/manager.go @@ -229,6 +229,9 @@ func (n *Mgr) Stop() { func (n *Mgr) checkShards() { for _, strategy := range n.strategies { ctx := context.Background() + + //nolint:errcheck // We don't care for this error. The nodes manager is only + // used for the deprecated SQL elector anyway. strategy.checkNodes(ctx) } } diff --git a/internal/praefect/nodes/sql_elector.go b/internal/praefect/nodes/sql_elector.go index fb976a3ed..b3adf2d8c 100644 --- a/internal/praefect/nodes/sql_elector.go +++ b/internal/praefect/nodes/sql_elector.go @@ -144,6 +144,8 @@ func (s *sqlElector) stop() { func (s *sqlElector) bootstrap(d time.Duration) { ctx := context.Background() + //nolint:errcheck // We don't care for this error. The nodes manager is only + // used for the deprecated SQL elector anyway. s.checkNodes(ctx) } @@ -159,6 +161,9 @@ func (s *sqlElector) monitor(d time.Duration) { return case <-ticker.C: } + + //nolint:errcheck // We don't care for this error. The nodes manager is only + // used for the deprecated SQL elector anyway. s.checkNodes(ctx) } } |