Bug 19523 - Koha::Cache changes not passed to all plack workers with in-memory caching.
Summary: Koha::Cache changes not passed to all plack workers with in-memory caching.
Status: NEW
Alias: None
Product: Koha
Classification: Unclassified
Component: Architecture, internals, and plumbing (show other bugs)
Version: master
Hardware: All All
: P5 - low enhancement (vote)
Assignee: Bugs List
QA Contact: Testopia
URL:
Keywords:
Depends on: 18232
Blocks:
  Show dependency treegraph
 
Reported: 2017-10-24 13:49 UTC by Olli-Antti Kivilahti
Modified: 2019-09-19 01:45 UTC (History)
3 users (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:


Attachments
Bug 19523 - Koha::Cache changes not passed to all plack workers with in-memory caching. (1.88 KB, patch)
2017-10-24 13:51 UTC, Olli-Antti Kivilahti
Details | Diff | Splinter Review
Bug 19532: Some fiddly fixes (6.24 KB, patch)
2017-11-24 01:53 UTC, Aleisha Amohia
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Olli-Antti Kivilahti 2017-10-24 13:49:24 UTC
REPRODUCE:

- $KOHA_CONF shouldn't have any <memcached_* -definitions. This triggers in-memory cache usage.
- plack workers is atleast 2
- Change some easily visible syspref, such as 'languages'. The syspref change applies only to the worker thread where the change was made. Other worker threads keep using the old syspref.
- Observer that 50% of time the old syspref is used. Other times the new syspref is used.
- Reduce plack workers to 1. Observe no issues with syspref change taking effect.


Using memcached solves this problem.

It is still useful to fix it for those who don't want to use memcached.
Comment 1 Olli-Antti Kivilahti 2017-10-24 13:51:06 UTC
Created attachment 68469 [details] [review]
Bug 19523 - Koha::Cache changes not passed to all plack workers with in-memory caching.

REPRODUCE:

- $KOHA_CONF shouldn't have any <memcached_* -definitions. This triggers in-memory cache usage.
- plack workers is atleast 2
- Change some easily visible syspref, such as 'languages'. The syspref change applies only to the worker thread where the change was made. Other worker threads keep using the old syspref.
- Observe that 50% of time the old syspref is used. Other times the new syspref is used.
- Reduce plack workers to 1. Observe no issues with syspref change taking effect.

Using memcached solves this problem.

It is still useful to fix it for those who don't want to use memcached.
Comment 2 Aleisha Amohia 2017-11-24 01:53:45 UTC
Created attachment 69325 [details] [review]
Bug 19532: Some fiddly fixes

Little typos etc
Comment 3 Lari Taskula 2018-06-11 14:44:47 UTC
Comment on attachment 69325 [details] [review]
Bug 19532: Some fiddly fixes

Removed patch from another bug :)
Comment 4 Fridolin Somers 2018-08-01 07:29:48 UTC
Indeed, Memcached is recomanded with Plack.
Comment 5 David Cook 2019-09-19 01:45:03 UTC
I found the title and description for this misleading, but the patch looks good at a glance.