diff --git a/internals/overlord/logstate/loki.go b/internals/overlord/logstate/loki.go index 03a066d8a..b342b2c96 100644 --- a/internals/overlord/logstate/loki.go +++ b/internals/overlord/logstate/loki.go @@ -67,6 +67,10 @@ func asLokiEntry(entry servicelog.Entry) lokiEntry { } func (c *lokiClient) Flush(ctx context.Context) error { + if c.numEntries() == 0 { + return nil // no-op + } + defer func() { for svc := range c.entries { c.entries[svc] = c.entries[svc][:0]