Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@DuodenumL
Copy link
Contributor

在缓存机制挪到GetEngine里面之后,这里的日志每次调用GetNode的时候都会打一遍,数量超大。

现在改成了:如果key不存在就不会报错。

log.Warnf(ctx, "[makeClient] Get key failed %v", err)
ev, err := m.GetOne(ctx, fmt.Sprintf(keyFormats[i], node.Name))
if err != nil {
if !strings.Contains(err.Error(), types.ErrBadCount.Error()) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

v, err := r.GetOne(ctx, fmt.Sprintf(keyFormats[i], node.Name))
if err != nil {
log.Warnf(ctx, "[makeClient] Get key failed %v", err)
if !isRedisNoKeyError(err) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

居然还有这种神奇的函数..

@jschwinger233
Copy link
Member

自己的本地跑一下, 创建一个容器试试

@DuodenumL
Copy link
Contributor Author

自己的本地跑一下, 创建一个容器试试

用agent调用SetNode试了一下,没啥问题...

@jschwinger233 jschwinger233 merged commit 069ad55 into projecteru2:master Oct 29, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants