Bugzilla – Attachment 92867 Details for
Bug 13193
Make Memcached usage fork safe
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 13193: Make Memcached usage fork safe
Bug-13193-Make-Memcached-usage-fork-safe.patch (text/plain), 3.40 KB, created by
David Cook
on 2019-09-17 04:04:44 UTC
(
hide
)
Description:
Bug 13193: Make Memcached usage fork safe
Filename:
MIME Type:
Creator:
David Cook
Created:
2019-09-17 04:04:44 UTC
Size:
3.40 KB
patch
obsolete
>From 1ec44c46d370007ae341b7e8dd7bc7fa75958664 Mon Sep 17 00:00:00 2001 >From: =?UTF-8?q?Joonas=20Kylm=C3=A4l=C3=A4?= <joonas.kylmala@helsinki.fi> >Date: Mon, 16 Sep 2019 10:26:01 +0000 >Subject: [PATCH] Bug 13193: Make Memcached usage fork safe > >When a high enough number of forks try to access for example system >preferences with Koha::Cache using memcached as backend the results of >different cache requests get mixed up. > >The problem is fixed by using Cache::Memcached::Fast::Safe that is a >fork safe version of Cache::Memcached::Fast. > >Sponsored-by: The National Library of Finland >Signed-off-by: David Cook <dcook@prosentient.com.au> > >Works as described, and solves an insidious difficult to debug >problem in Koha. >--- > C4/Installer/PerlDependencies.pm | 7 ++++++- > Koha/Cache.pm | 6 +++--- > koha-tmpl/intranet-tmpl/prog/en/modules/about.tt | 2 +- > 3 files changed, 10 insertions(+), 5 deletions(-) > >diff --git a/C4/Installer/PerlDependencies.pm b/C4/Installer/PerlDependencies.pm >index f7244744d9..a3d4a4d1be 100644 >--- a/C4/Installer/PerlDependencies.pm >+++ b/C4/Installer/PerlDependencies.pm >@@ -265,7 +265,12 @@ our $PERL_DEPS = { > 'Cache::Memcached::Fast' => { > 'usage' => 'Caching', > 'required' => '0', >- 'min_ver' => '0.17' >+ 'min_ver' => '0.19' >+ }, >+ 'Cache::Memcached::Fast::Safe' => { >+ 'usage' => 'Caching', >+ 'required' => '0', >+ 'min_ver' => '0.06' > }, > 'Cache::FastMmap' => { > 'usage' => 'Caching', >diff --git a/Koha/Cache.pm b/Koha/Cache.pm >index cf77257825..95d0e6ba1b 100644 >--- a/Koha/Cache.pm >+++ b/Koha/Cache.pm >@@ -87,7 +87,7 @@ sub new { > $self->{namespace} .= ":$subnamespace:"; > > if ( $self->{'default_type'} eq 'memcached' >- && can_load( modules => { 'Cache::Memcached::Fast' => undef } ) >+ && can_load( modules => { 'Cache::Memcached::Fast::Safe' => undef } ) > && _initialize_memcached($self, @servers) > && defined( $self->{'memcached_cache'} ) ) > { >@@ -120,9 +120,9 @@ sub _initialize_memcached { > . join( ', ', @servers ) > . " with " > . $self->{'namespace'}; >- # Cache::Memcached::Fast doesn't allow a default expire time to be set >+ # Cache::Memcached::Fast::Safe doesn't allow a default expire time to be set > # so we force it on setting. >- my $memcached = Cache::Memcached::Fast->new( >+ my $memcached = Cache::Memcached::Fast::Safe->new( > { > servers => \@servers, > compress_threshold => 10_000, >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/about.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/about.tt >index 5b8c1c431e..eabb599140 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/about.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/about.tt >@@ -102,7 +102,7 @@ > [% CASE # nowhere %] > <span class="status_warn">Nowhere</span> Note that the right place to define the memcached config is in your $KOHA_CONF file. Currently you do not have a valid memcached configuration defined. > [% END %] >- [% IF effective_caching_method != 'Cache::Memcached::Fast' %] >+ [% IF effective_caching_method != 'Cache::Memcached::Fast::Safe' %] > | Effective caching method: [% effective_caching_method | html %] > [% END %] > </td> >-- >2.16.4
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 13193
:
92827
|
92835
| 92867 |
92868
|
92926
|
92931
|
98546
|
98550