[Bug 20884] New: Stale data remaining in cache after koha-remove
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20884 Bug ID: 20884 Summary: Stale data remaining in cache after koha-remove Change sponsored?: --- Product: Koha Version: 18.05 Hardware: All OS: All Status: NEW Severity: minor Priority: P5 - low Component: Packaging Assignee: koha-bugs@lists.koha-community.org Reporter: jcharaoui@cmaisonneuve.qc.ca QA Contact: testopia@bugs.koha-community.org CC: mirko@abunchofthings.net Created attachment 75836 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=75836&action=edit 0001-Restart-memcached-after-koha-remove-if-needed.patch After running koha-remove, stale data remains in within the memcached server. Say if an instance is deleted then recreated immediately, changed data such as database credentials isn't loaded into the cache, resulting in strange, difficult to troubleshoot problems. The solution would be to flush memcached cache at the end of koha-remove. The most straightforward method to do this is simply restart the service. See attached patch. -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20884 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jonathan.druart@bugs.koha-c | |ommunity.org --- Comment #1 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Note for later, see also: https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=75384 -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20884 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Severity|minor |normal Assignee|koha-bugs@lists.koha-commun |jcharaoui@cmaisonneuve.qc.c |ity.org |a Version|18.05 |master -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20884 Jerome Charaoui <jcharaoui@cmaisonneuve.qc.ca> changed: What |Removed |Added ---------------------------------------------------------------------------- Patch complexity|--- |Small patch Status|NEW |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20884 --- Comment #2 from Jerome Charaoui <jcharaoui@cmaisonneuve.qc.ca> --- Using a function like flush_cache() would indeed be better than restarting the service. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20884 Josef Moravec <josef.moravec@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |josef.moravec@gmail.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20884 Hayley Mapley <hayleymapley@catalyst.net.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |hayleymapley@catalyst.net.n | |z --- Comment #3 from Hayley Mapley <hayleymapley@catalyst.net.nz> --- Hi, Is there a test plan for this? Or do changes need to be made to align with the previous comments? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20884 --- Comment #4 from M. Tompsett <mtompset@hotmail.com> --- Comment on attachment 75836 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=75836 0001-Restart-memcached-after-koha-remove-if-needed.patch Review of attachment 75836: --> (https://bugs.koha-community.org/bugzilla3/page.cgi?id=splinter.html&bug=20884&attachment=75836) ----------------------------------------------------------------- ::: debian/scripts/koha-remove @@ +139,5 @@
done
+if [ -e /etc/koha/koha-sites.conf ] +then + . /etc/koha/koha-sites.conf
What is the purpose of this? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20884 --- Comment #5 from Jerome Charaoui <jcharaoui@cmaisonneuve.qc.ca> --- The purpose is to load the USE_MEMCACHED variable into the environment from koha-sites.conf. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20884 M. Tompsett <mtompset@hotmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://bugs.koha-community | |.org/bugzilla3/show_bug.cgi | |?id=20116 CC| |mtompset@hotmail.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20884 Magnus Enger <magnus@libriotech.no> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Failed QA CC| |magnus@libriotech.no --- Comment #6 from Magnus Enger <magnus@libriotech.no> --- I dont like "memcached restart" for this. We have many Koha instances on the same server, all using the same memcached instance. We also have SessionStorage = memcached. This means that if we remove an instance, memcached will be restarted and every user of every Koha instance will be logged out. If it is possible to just flush the cash of the removed site that would be much better. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20884 --- Comment #7 from Magnus Enger <magnus@libriotech.no> --- Looking at this a bit more it looks like there is no easy way to clear/flush memcached for only one namespace (since memcached does not really have a concept of namespaces) or Koha site. Unless there is some magic in Koha::Cache et al that goes way above my head. As far as I can make out the problem is there is no way to list all keys in mamcahed so they could all be deleted. To get around this we would have to register all the keys we use somewhere and then loop over and delete them. That could perhaps be doable, though? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20884 --- Comment #8 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- See comment 1 and the patch I linked to. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20884 --- Comment #9 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- We now have misc/bin/clear_cache.pl. That should be quite easy to implement a call to this script to clean the cache correctly (and avoid restarting memcached). -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org