[Koha-devel] Cache::Memory must be removed (21955)

Marcel de Rooy M.de.Rooy at rijksmuseum.nl
Thu Dec 6 08:15:02 CET 2018


+1

________________________________
Van: koha-devel-bounces at lists.koha-community.org <koha-devel-bounces at lists.koha-community.org> namens Jonathan Druart <jonathan.druart at bugs.koha-community.org>
Verzonden: woensdag 5 december 2018 20:20:35
Aan: koha-devel
Onderwerp: [Koha-devel] Cache::Memory must be removed (21955)

Hi devs,

I am still recovering from my holidays and I think I caught a quite big fish.

After an interesting track game I will explain why I am suggesting to
remove Cache::Memory that is currently used as fallback for the L2
cache.

What I tried to fix:
Jenkins is complaining about selenium tests (regressions.t) failing on
18.05, it is a succession of events and bugs that were not linked at
first glance.

Here are the different steps I went though:
- On bug 21426 we noticed that USE_MEMCACHED was not taken into
account. If set to "no" the default memcached config was defined in
the koha-config.xml file anyway
- A new regression selenium test was added on bug 21777 to catch the
presence of an audio alert on the circulation page
- Investigating the failing tests I noticed that koha-testing-docker
was not setting the memcached config on the 18.05 branches (I guess
the image has not been rebuilt yet)
search_utf8.t output "Warning: script running in daemon mode, without
recommended caching system (memcached)."
- I also find that [% Koha.Preference('AudioAlerts') %] did not return
the value set by the tests, but the value that the DB has before the
tests were launched
=> It is a cache issue!
- ...but only when memcached is not set...
- Reading Koha::Cache->new we can notice that Cache::Memory is used
for the L2 cache when memcached is not defined in the config

And so we have the problem: If a value is set in the cache by a Plack
worker, it will not be available from another one, as the L2 cache is
not shared (!)

To recreate easily the problem you can:
- remove the memcached config
- edit intranet-bottom.inc and add
===[% Koha.Preference('AudioAlerts') %]===
- restart plack
- Modify the value of AudioAlerts (using the UI)
- Reload the page (reload several times if the value is still correct,
it will depend on which worker will serve the request)

Solution:
I am considering removing Cache::Memory unless somebody else has a better idea
Bug 21955 - Cache::Memory should not be used as L2 cache

Note that it should not affect a lot of people as everybody is
supposed to have memcached configured and working correctly!

Cheers,
Jonathan
_______________________________________________
Koha-devel mailing list
Koha-devel at lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-devel
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.koha-community.org/pipermail/koha-devel/attachments/20181206/51a76886/attachment.html>


More information about the Koha-devel mailing list