Summary: | Stale data remaining in cache after koha-remove | ||
---|---|---|---|
Product: | Koha | Reporter: | Jerome Charaoui <jcharaoui> |
Component: | Packaging | Assignee: | Jerome Charaoui <jcharaoui> |
Status: | Failed QA --- | QA Contact: | Testopia <testopia> |
Severity: | normal | ||
Priority: | P5 - low | CC: | hayleypelham, jonathan.druart, josef.moravec, magnus, mirko, mtompset |
Version: | Main | ||
Hardware: | All | ||
OS: | All | ||
See Also: | https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20116 | ||
Change sponsored?: | --- | Patch complexity: | Small patch |
Documentation contact: | Documentation submission: | ||
Text to go in the release notes: | Version(s) released in: | ||
Circulation function: | |||
Attachments: | 0001-Restart-memcached-after-koha-remove-if-needed.patch |
Description
Jerome Charaoui
2018-06-05 20:09:48 UTC
Note for later, see also: https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=75384 Using a function like flush_cache() would indeed be better than restarting the service. Hi, Is there a test plan for this? Or do changes need to be made to align with the previous comments? Comment on attachment 75836 [details] [review] 0001-Restart-memcached-after-koha-remove-if-needed.patch Review of attachment 75836 [details] [review]: ----------------------------------------------------------------- ::: 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? The purpose is to load the USE_MEMCACHED variable into the environment from koha-sites.conf. 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. 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? 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). |