Skip to content

Commit

Permalink
fix:code style
Browse files Browse the repository at this point in the history
  • Loading branch information
chuntaojun committed Dec 26, 2023
1 parent 5071e23 commit 6d31608
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions pkg/controller/configmap.go
Original file line number Diff line number Diff line change
Expand Up @@ -444,7 +444,7 @@ func (p *PolarisConfigWatcher) fetchResources(ctx context.Context) {
}

func (p *PolarisConfigWatcher) fetchGroups(ns string) {
log.SyncConfigMapScope().Infof("begin fetch config groups for namespace(%v)", ns)
log.SyncConfigMapScope().Debugf("begin fetch config groups for namespace(%v)", ns)
p.groups.ComputeIfAbsent(ns, func(k string) *util.SyncSet[string] {
return util.NewSyncSet[string]()
})
Expand Down Expand Up @@ -487,7 +487,7 @@ func (p *PolarisConfigWatcher) receiveGroups(resp *config_manage.ConfigDiscoverR
}

func (p *PolarisConfigWatcher) fetchConfigFiles(namespace, group string) {
log.SyncConfigMapScope().Infof("begin fetch config files for namespace(%v) group(%s)", namespace, group)
log.SyncConfigMapScope().Debugf("begin fetch config files for namespace(%v) group(%s)", namespace, group)
key := namespace + "/" + group
preRevision, _ := p.filesRevisions.Load(key)
discoverClient := p.discoverClient
Expand Down Expand Up @@ -525,12 +525,12 @@ func (p *PolarisConfigWatcher) receiveConfigFiles(resp *config_manage.ConfigDisc
nsBucket, _ := p.needSyncFiles.Load(nsName)
groupBucket, _ := nsBucket.Load(groupName)
if p.allowSyncToConfigMap(item) {
val, isOld := groupBucket.ComputeIfAbsent(fileName, func(k string) *configFileRefrence {
val, isNew := groupBucket.ComputeIfAbsent(fileName, func(k string) *configFileRefrence {
return &configFileRefrence{
Revision: 0,
}
})
if isOld && val.Revision <= item.GetVersion().GetValue() {
if isNew || val.Revision <= item.GetVersion().GetValue() {
val.Revision = item.GetVersion().Value
groupBucket.Store(fileName, val)
wait.Add(1)
Expand All @@ -555,7 +555,7 @@ func (p *PolarisConfigWatcher) receiveConfigFiles(resp *config_manage.ConfigDisc
}

wait.Wait()
log.SyncConfigMapScope().Info("finish config map sync", zap.Duration("cost", time.Since(start)),
log.SyncConfigMapScope().Debugf("finish config map sync", zap.Duration("cost", time.Since(start)),

Check failure on line 558 in pkg/controller/configmap.go

View workflow job for this annotation

GitHub Actions / golangci-lint (1.21)

printf: (*github.com/polarismesh/polaris-controller/common/log.Scope).Debugf call has arguments but no formatting directives (govet)

Check failure on line 558 in pkg/controller/configmap.go

View workflow job for this annotation

GitHub Actions / build

(*github.com/polarismesh/polaris-controller/common/log.Scope).Debugf call has arguments but no formatting directives
zap.Int32("add", syncCnt.Load()), zap.Int32("del", delCnt.Load()))
}

Expand Down

0 comments on commit 6d31608

Please sign in to comment.