From 0ba28a712aa3a78e1e93af96ef6800cc10940633 Mon Sep 17 00:00:00 2001 From: Ibrahim Serdar Acikgoz Date: Thu, 25 Feb 2021 17:31:26 +0300 Subject: [PATCH] [MM-32348] services/bleve: only log update conf when there is an actual change (#17003) * services/bleve: only log update conf when there is an actual change * Update services/searchengine/bleveengine/bleve.go Co-authored-by: Miguel de la Cruz Co-authored-by: Miguel de la Cruz --- services/searchengine/bleveengine/bleve.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/services/searchengine/bleveengine/bleve.go b/services/searchengine/bleveengine/bleve.go index 1e5dcba056..27eb7ed2aa 100644 --- a/services/searchengine/bleveengine/bleve.go +++ b/services/searchengine/bleveengine/bleve.go @@ -7,6 +7,7 @@ import ( "net/http" "os" "path/filepath" + "reflect" "sync" "sync/atomic" "time" @@ -303,6 +304,10 @@ func (b *BleveEngine) UpdateConfig(cfg *model.Config) { b.Mutex.Lock() defer b.Mutex.Unlock() + if reflect.DeepEqual(cfg.BleveSettings, b.cfg.BleveSettings) { + return + } + mlog.Info("UpdateConf Bleve") if *cfg.BleveSettings.EnableIndexing != *b.cfg.BleveSettings.EnableIndexing || *cfg.BleveSettings.IndexDir != *b.cfg.BleveSettings.IndexDir {