From 98fb5f28a87f1e3a92eaba1f189a936e1ba388df Mon Sep 17 00:00:00 2001 From: Lakshay Kalbhor Date: Wed, 4 Sep 2024 13:00:54 +0530 Subject: [PATCH] fix: send unhealthy signal on fetches error (#31) --- internal/relay/relay.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/internal/relay/relay.go b/internal/relay/relay.go index d017ebe..606805b 100644 --- a/internal/relay/relay.go +++ b/internal/relay/relay.go @@ -196,7 +196,10 @@ loop: fetches, err := re.source.GetFetches(server) if err != nil { - re.log.Debug("marking server as unhealthy", "server", server.ID) + re.log.Error("marking server as unhealthy", "server", server.ID) + re.signalCh <- struct{}{} + + continue loop } re.log.Debug("received fetches", "len", fetches.NumRecords())