-
-
Notifications
You must be signed in to change notification settings - Fork 100
Add child init hook for cache backends #290
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
|
OK with this patch in principle. Could you remove the changed lines where only whitespace formatting has been changed please. Also, given that very few caches actually use this, can you create a single no-op mapcache_cache_null_child_init function and reference that one instead of creating one no-op child init function per cache. thanks! |
…process. In the case of Apache mpm_event, child_init is executed after process start (fork) and before starting any threads that will do actual request processing.
|
It is a bit pity that the astyle script present in the code base can not be run after making modifications to files. I replaced all cache specific child init functions with a single noop function. Should be better now. I do not understand why tests are failing as (at least locally) I see that images are generated and seem to be fine although their checksums do not match one listed in the test script. A difference in GDAL/libjpeg? |
|
I think Travis CI check should be unplugged now: A GitHub Actions check has been activated few months ago. I just don't understand why it has not been triggered here. |
|
Is there anything I can do to push this forward? #293 can not be merged before this PR. |
tbonfort
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.
LGTM
|
fwiw, 1.14 fails to build with clang 13 on OpenBSD: dropping the |
|
fwiw, apparently |
This doesn't seem to be right as there is no such limitation for GCC. |
|
i have no idea whether this is right or wrong, i'm just saying it fails with clang 13 in this configuration. |
Depending on a cache backend in use it might be necessary to perform some kind of initialization when a server worker process starts. In the case of Apache (MPM event) the child_init hook runs after a process has been created (forked) and before serving threads have been created. Currently this child_init hook is not exposed directly to cache backends and it is used only to set up connection pool. This PR adds a child_init hook for usage in any cache backend. At the moment there are no backends using this hook, although it might be required for (probably) Berkeley and (quite certainly) for TokyoCabinet backends. A LMDB cache backend requiring this hook is now under testing.