mirror of
https://github.com/mattermost/mattermost.git
synced 2026-09-24 16:05:00 +08:00
[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 <miguel@mcrx.me> Co-authored-by: Miguel de la Cruz <miguel@mcrx.me>
This commit is contained in:
co-authored by
Miguel de la Cruz
parent
0c7261b157
commit
0ba28a712a
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user