<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<style type="text/css" style="display:none;"><!-- P {margin-top:0;margin-bottom:0;} --></style>
</head>
<body dir="ltr">
<div id="divtagdefaultwrapper" style="font-size:12pt;color:#000000;font-family:Calibri,Helvetica,sans-serif;" dir="ltr">
<p style="margin-top:0;margin-bottom:0">+1</p>
</div>
<hr style="display:inline-block;width:98%" tabindex="-1">
<div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" style="font-size:11pt" color="#000000"><b>Van:</b> koha-devel-bounces@lists.koha-community.org <koha-devel-bounces@lists.koha-community.org> namens Jonathan Druart <jonathan.druart@bugs.koha-community.org><br>
<b>Verzonden:</b> woensdag 5 december 2018 20:20:35<br>
<b>Aan:</b> koha-devel<br>
<b>Onderwerp:</b> [Koha-devel] Cache::Memory must be removed (21955)</font>
<div> </div>
</div>
<div class="BodyFragment"><font size="2"><span style="font-size:11pt;">
<div class="PlainText">Hi devs,<br>
<br>
I am still recovering from my holidays and I think I caught a quite big fish.<br>
<br>
After an interesting track game I will explain why I am suggesting to<br>
remove Cache::Memory that is currently used as fallback for the L2<br>
cache.<br>
<br>
What I tried to fix:<br>
Jenkins is complaining about selenium tests (regressions.t) failing on<br>
18.05, it is a succession of events and bugs that were not linked at<br>
first glance.<br>
<br>
Here are the different steps I went though:<br>
- On bug 21426 we noticed that USE_MEMCACHED was not taken into<br>
account. If set to "no" the default memcached config was defined in<br>
the koha-config.xml file anyway<br>
- A new regression selenium test was added on bug 21777 to catch the<br>
presence of an audio alert on the circulation page<br>
- Investigating the failing tests I noticed that koha-testing-docker<br>
was not setting the memcached config on the 18.05 branches (I guess<br>
the image has not been rebuilt yet)<br>
search_utf8.t output "Warning: script running in daemon mode, without<br>
recommended caching system (memcached)."<br>
- I also find that [% Koha.Preference('AudioAlerts') %] did not return<br>
the value set by the tests, but the value that the DB has before the<br>
tests were launched<br>
=> It is a cache issue!<br>
- ...but only when memcached is not set...<br>
- Reading Koha::Cache->new we can notice that Cache::Memory is used<br>
for the L2 cache when memcached is not defined in the config<br>
<br>
And so we have the problem: If a value is set in the cache by a Plack<br>
worker, it will not be available from another one, as the L2 cache is<br>
not shared (!)<br>
<br>
To recreate easily the problem you can:<br>
- remove the memcached config<br>
- edit intranet-bottom.inc and add<br>
===[% Koha.Preference('AudioAlerts') %]===<br>
- restart plack<br>
- Modify the value of AudioAlerts (using the UI)<br>
- Reload the page (reload several times if the value is still correct,<br>
it will depend on which worker will serve the request)<br>
<br>
Solution:<br>
I am considering removing Cache::Memory unless somebody else has a better idea<br>
Bug 21955 - Cache::Memory should not be used as L2 cache<br>
<br>
Note that it should not affect a lot of people as everybody is<br>
supposed to have memcached configured and working correctly!<br>
<br>
Cheers,<br>
Jonathan<br>
_______________________________________________<br>
Koha-devel mailing list<br>
Koha-devel@lists.koha-community.org<br>
<a href="http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-devel">http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-devel</a><br>
website : <a href="http://www.koha-community.org/">http://www.koha-community.org/</a><br>
git : <a href="http://git.koha-community.org/">http://git.koha-community.org/</a><br>
bugs : <a href="http://bugs.koha-community.org/">http://bugs.koha-community.org/</a><br>
</div>
</span></font></div>
</body>
</html>