We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ffbed61 commit 9056189Copy full SHA for 9056189
service/service.go
@@ -33,6 +33,7 @@ import (
33
"net"
34
"net/http"
35
"path/filepath"
36
+ "reflect"
37
"strconv"
38
"strings"
39
"sync"
@@ -1043,9 +1044,14 @@ func (s *Service) UpdateClusterConfig(newConfig ClusterConfig) {
1043
1044
return
1045
}
1046
- // TODO only update when changed
1047
- s.myPeers = newConfig
1048
- s.saveSetup()
+ // Only update when changed
+ if !reflect.DeepEqual(s.myPeers, newConfig) {
1049
+ s.myPeers = newConfig
1050
+ s.saveSetup()
1051
+ s.log.Debug().Msg("Updated cluster config")
1052
+ } else {
1053
+ s.log.Debug().Msg("Updating cluster config is not needed")
1054
+ }
1055
1056
1057
// MasterChangedCallback interrupts the runtime cluster manager
0 commit comments