Bug 16105 - Cache::Memory is loaded even if memcache is used
Summary: Cache::Memory is loaded even if memcache is used
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Architecture, internals, and plumbing (show other bugs)
Version: master
Hardware: All All
: P5 - low minor (vote)
Assignee: Jonathan Druart
QA Contact: Testopia
URL:
Keywords:
Depends on: 16104 11998
Blocks:
  Show dependency treegraph
 
Reported: 2016-03-18 13:38 UTC by Jonathan Druart
Modified: 2016-12-05 21:25 UTC (History)
6 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 16105: Do not initialize the memory cache if not needed (3.18 KB, patch)
2016-03-18 13:42 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 16105: [DO NOT PUSH] warn to test the patch (1.32 KB, patch)
2016-04-15 08:23 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 16105: Do not initialize the memory cache if not needed (3.24 KB, patch)
2016-04-28 02:28 UTC, Chris Cormack
Details | Diff | Splinter Review
Bug 16105: Do not initialize the memory cache if not needed (3.29 KB, patch)
2016-04-28 12:46 UTC, Kyle M Hall
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Jonathan Druart 2016-03-18 13:38:29 UTC
Cache::Memory is loaded and Koha::Cache::_initialize_memory is called even if a memcached cache has been correctly initialize, it does not make sense.
It should only be initialize if needed.
Comment 1 Jonathan Druart 2016-03-18 13:42:05 UTC Comment hidden (obsolete)
Comment 2 Mirko Tietgen 2016-04-14 18:53:49 UTC
(In reply to Jonathan Druart from comment #1)

> Correctly configure a memcache server and confirm that the memory cache
> is not initialize.

How do I do that (the second part)?
Comment 3 Jonathan Druart 2016-04-15 08:23:32 UTC
Created attachment 50260 [details] [review]
Bug 16105: [DO NOT PUSH] warn to test the patch

Test plan:
Apply this patch
Notice the 2 warnings:
  init memcached
  init memory
in the log
Apply the second patch "Do not initialize the memory cache if not needed"
Notice the single warning:
  init memcached
Comment 4 Jonathan Druart 2016-04-15 08:24:10 UTC
(In reply to Mirko Tietgen from comment #2)
> (In reply to Jonathan Druart from comment #1)
> 
> > Correctly configure a memcache server and confirm that the memory cache
> > is not initialize.
> 
> How do I do that (the second part)?

When you are lost, put some warns :p
See this second patch and its test plan to test the patch.
Comment 5 Chris Cormack 2016-04-28 02:28:04 UTC Comment hidden (obsolete)
Comment 6 Katrin Fischer 2016-04-28 12:33:41 UTC
enh or bug?
Comment 7 Kyle M Hall 2016-04-28 12:46:12 UTC
Created attachment 50911 [details] [review]
Bug 16105: Do not initialize the memory cache if not needed

Cache::Memory is loaded and Koha::Cache::_initialize_memory is called
even if a memcached cache has been correctly initialize, it does not
make sense.
It should only be initialize if needed.

Test plan:
Correctly configure a memcache server and confirm that the memory cache
is not initialize.
Do not configure correctly a memcache server and confirm that the cache
system default on Cache::Memory

Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Comment 8 Brendan Gallagher 2016-04-29 02:51:13 UTC
Pushed to Master - should be in the May 2016 - Release.   Thanks!
Comment 9 Julian Maurice 2016-05-16 10:21:46 UTC
Patch pushed to 3.22.x, will be in 3.22.7