-
-
Notifications
You must be signed in to change notification settings - Fork 4.7k
feat(AppConfig): cache the config if local cache is available #54383
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
Conversation
e05a6f3 to
d59d106
Compare
09672be to
76b96cc
Compare
7629f91 to
ae90298
Compare
Signed-off-by: Ferdinand Thiessen <[email protected]>
Signed-off-by: Ferdinand Thiessen <[email protected]>
Signed-off-by: Ferdinand Thiessen <[email protected]>
This removes a circular dependency between AppConfig and cache factory. When a cache in the app config is used. Signed-off-by: Ferdinand Thiessen <[email protected]>
Signed-off-by: Ferdinand Thiessen <[email protected]>
Signed-off-by: Ferdinand Thiessen <[email protected]>
ae90298 to
503f43f
Compare
first one to green CI wins! Ready, set, go! 🐎 🏁 |
AndyScherzinger
left a comment
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.
🚀
|
I forgot to send my review comments -_-, they were stuck in pending. |
|
This seems to break a usecase in Talk (see nextcloud/spreed#16227). Within one request to Talk:
In some cases, the value read in step 4 is empty, so the request can not be authenticated by the HPB service. If I set Thanks for @SystemKeeper for tracking this down. |
|
The problem is I guess setting a value that is cached should $refreshCache as well? |
IMHO that's the right thing to do. Having to clear the cache manually is a functional change that might break other affected apps, too. |
The local cache is also cleared for non-lazy writes: server/lib/private/AppConfig.php Line 906 in 503f43f
This is only for removing the class local dictionary and that's not needed for non lazy as they are just added to the dictionary anyways. |
|
How does this work with clustered setups? I also fear this could break in a lot more places if a config value is written on one webserver and then the old valuer is still read on another webserver. Should we recommend disabling this for clustered instances? Maybe then the default should be switched to false for the config.php option? This will be super hard to debug such issues in production scenarios. :/ |
|
Good point. FWIW, our setup is not clustered but running the FPM Docker image (non-AIO). |
This was discussed with product management but decided that it has great benefits for the majority and there are only some special cases. If for any reason pinned sessions are not possible (we do not recommend this) then this can manually disabled in the settings, but this only affects very edge cases. |
We always suggest either sticky sessions or redis as session storage, unless this changed recently. We have quite a few big instances not using session stickyness. I think this shoud at least be properly documented and also noted to admins in the upgrade manuals. |
Summary
Benchmark
Tested flow:
Queries on the app config table:
Checklist