-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
refactor(pluginserver): reset instance triggers invalidation #11819
Conversation
Consistently trigger invalidation events.
Also, `get_instance_id` uses plugin cache key to fetch instance id.
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.
This should work. But as for the EE PR, we have the same improvements that could be done:
seq is not used so could be removed.
Also, a note to myself: we could use a much simpler model, which does not require maintaining an instance list:
- Every worker starts and maintains its instance of plugin server binary;
- All plugin instances (for a single worker) run on the same process. It means no thread/go routine is needed
This is possible as we do not maintain states for plugin instance.
if err_lowered == "not ready" then | ||
self.reset_instance(plugin_name, conf) | ||
end | ||
if str_find(err_lowered, "no plugin instance") |
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.
need to exit when err_lowered
appears here?
Cherry-pick fixes https://github.com/Kong/kong-ee/pull/6417.
KAG-2859.