-
Notifications
You must be signed in to change notification settings - Fork 336
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
优化longPulling err时delay、防止日志瞬间写满 #92
Conversation
Codecov Report
@@ Coverage Diff @@
## develop #92 +/- ##
===========================================
+ Coverage 72.00% 72.19% +0.18%
===========================================
Files 15 15
Lines 1186 1194 +8
===========================================
+ Hits 854 862 +8
Misses 265 265
Partials 67 67
Continue to review full report at Codecov.
|
changedConfigs := strings.Split(changed, "%01") | ||
for _, config := range changedConfigs { | ||
attrs := strings.Split(config, "%02") | ||
if len(attrs) >= 2 { | ||
if value, ok := cacheMap.Get(utils.GetConfigCacheKey(attrs[0], attrs[1], tenant)); ok { | ||
cData := value.(cacheData) | ||
if content, err := client.getConfigInner(vo.ConfigParam{ | ||
if content, err2 := client.getConfigInner(vo.ConfigParam{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
为什么要使用err2这个变量?我觉得不需要引入这个变量
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
client.getConfigInner如果出错(比如group或dataid错误),日志还是会大量报错(config_client.go 429行)
const perTaskConfigSize = 3000 | ||
const ( | ||
perTaskConfigSize = 3000 | ||
executorErrDelay = 20 * time.Second |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
20秒太长停顿时间了,5秒合适点
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
可以的
No description provided.