-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
fix(nacos): add skipped nil check for "applications" upvalue #9960
Conversation
Signed-off-by: revolyssup <ashishjaitiwari15112000@gmail.com>
ff0d34f
apisix/discovery/nacos/init.lua
Outdated
return nil | ||
if not applications or not applications[namespace_id] | ||
or not applications[namespace_id][group_name] then | ||
return nil |
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.
four spaces are needed
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.
if not applications or not applications[namespace_id]
or not applications[namespace_id][group_name]
then
return nil
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.
done
Signed-off-by: Ashish Tiwari <ashishjaitiwari15112000@gmail.com>
@Revolyssup please merge the master branch |
done |
我有一点疑问:仅仅增加非空判断是否依然不能解决问题。因为在高并发情况下,我从日志上看到: 是否应该异步刷新,增加异步刷新结果、刷新时间和空值次数的控制。 我对lua不太了解,可能会有常识错误。如有问题请不要见怪 I have a question about whether simply adding nonempty judgments still won't solve the problem. Because in the case of high concurrency, I see from the log:
Whether to refresh asynchronously, increase the control of asynchronous refresh result, refresh time, and null times. I don't know much about lua and there may be common sense errors. Please don't be offended if you have any questions |
Description
Fixes #9527 (issue)
After the 5 second wait time, it can be possible that
applications
upvalue has still not being populated and is nil. So it should be checked.Checklist