Skip to content
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

Merged
merged 2 commits into from
Nov 7, 2023

Conversation

gszr
Copy link
Member

@gszr gszr commented Oct 23, 2023

gszr added 2 commits October 23, 2023 10:43
Consistently trigger invalidation events.
Also, `get_instance_id` uses plugin cache key to fetch instance id.
Copy link
Contributor

@StarlightIbuki StarlightIbuki left a 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:

  1. Every worker starts and maintains its instance of plugin server binary;
  2. 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.

Comment on lines +410 to +413
if err_lowered == "not ready" then
self.reset_instance(plugin_name, conf)
end
if str_find(err_lowered, "no plugin instance")
Copy link
Member

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?

@jschmid1 jschmid1 self-requested a review November 7, 2023 09:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants