-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
Plugins/DAO: incorrect function field reassignment #8788
Labels
Comments
bungle
added a commit
that referenced
this issue
Jun 3, 2022
### Summary When Kong 2.1.0 was release we needed to add special workaround to enable blue-green deployment with the introduction of workspaces. We needed to add special `select_by_cache_key` to `Plugins` DAO. The check that we added is hurting the Kong performance, as seen reported in #8788. We got further PR from the author with #8789. While the fix is good, I do think we can remove this by now altogether. The only downside of this is that is people migrate directly from Kong < 2.1.x to `3.0.0` we don't support the blue-green deployment. ### Issues Resolved Fixes #8788 Closes #8789
@jschmid1, I think @marc-charpentier already answered what they decided to do here: TL;DR; they decided to do what #8896 does. |
bungle
added a commit
that referenced
this issue
Jun 14, 2022
### Summary When Kong 2.1.0 was release we needed to add special workaround to enable blue-green deployment with the introduction of workspaces. We needed to add special `select_by_cache_key` to `Plugins` DAO. The check that we added is hurting the Kong performance, as seen reported in #8788. We got further PR from the author with #8789. While the fix is good, I do think we can remove this by now altogether. The only downside of this is that is people migrate directly from Kong < 2.1.x to `3.0.0` we don't support the blue-green deployment. ### Issues Resolved Fixes #8788 Closes #8789
Added #8789 (comment) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Is there an existing issue for this?
Kong version (
$ kong version
)Kong 2.8.1
Current Behavior
Hello,
In order to load a new plugin entity, a worker executes the
Plugins.select_by_cache_key
function (call tokong.db.plugins:select_by_cache_key(...)
, which delegates the load toDAO:select_by_cache_key
, and checks whether the core.009_200_to_210 migration was executed previously.If yes, before returning the loaded entity, the
Plugins.select_by_cache_key
function tries to self-replace by the DAO's one, but it doesn't work because the assigned field's object isn't the right one.As an impact, an important extra latency (kong) is added to the plugin's load one, for each request involving such load.
Expected Behavior
Once a worker as ensured that the core.009_200_to_210 migration was executed, it should no longer recheck for any plugin updated / created afterward.
Steps To Reproduce
Anything else?
To confirm that
Plugins:select_by_cache_key
function never succeeds to disable itself, I also added a notice message in its code, just before the instruction that should do the self-disabling. It should have logged the notice message only once (per worker, provided plugin is created/updated as many times as there are workers), but it did logged it for the first response after each plugin creation/update.The text was updated successfully, but these errors were encountered: