From 8dee3534927eb50572b003e6335f65e063b36701 Mon Sep 17 00:00:00 2001 From: Dan Bond Date: Tue, 16 May 2023 02:50:27 -0700 Subject: [PATCH] agent: don't write server metadata in dev mode (#17383) Signed-off-by: Dan Bond --- agent/agent.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/agent/agent.go b/agent/agent.go index 73906f853f..acb0ccd94e 100644 --- a/agent/agent.go +++ b/agent/agent.go @@ -636,8 +636,10 @@ func (a *Agent) Start(ctx context.Context) error { return err } - // periodically write server metadata to disk. - go a.persistServerMetadata() + // Periodically write server metadata to disk. + if !consulCfg.DevMode { + go a.persistServerMetadata() + } incomingRPCLimiter := consul.ConfiguredIncomingRPCLimiter( &lib.StopChannelContext{StopCh: a.shutdownCh},