Bug 16067 - Koha::Cache, fastmmap caching system is broken
Summary: Koha::Cache, fastmmap caching system is broken
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Architecture, internals, and plumbing (show other bugs)
Version: Main
Hardware: All All
: P5 - low normal (vote)
Assignee: Jonathan Druart
QA Contact: Martin Renvoize
URL:
Keywords:
Depends on: 11998
Blocks:
  Show dependency treegraph
 
Reported: 2016-03-14 16:32 UTC by Jacek Ablewicz
Modified: 2021-12-13 21:09 UTC (History)
8 users (show)

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


Attachments
Bug 16067: Remove FastMmap (3.93 KB, patch)
2018-12-17 16:00 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 16067: Remove FastMmap (3.92 KB, patch)
2020-11-25 14:51 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 16067: Remove FastMmap (3.98 KB, patch)
2020-11-26 08:35 UTC, Martin Renvoize
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Jacek Ablewicz 2016-03-14 16:32:24 UTC
After Bug 11998, fastmmap caching system implementation in Koha::Cache ceased to work properly. If fastmmap is enabled (= environment variable CACHING_SYSTEM is set to 'fastmmap'), any CGI script call causes the following error:

Use of uninitialized value $db_name in concatenation (.) or string at /home/koha/devkohaclone/Koha/Database.pm line 73.
Use of uninitialized value $db_host in concatenation (.) or string at /home/koha/devkohaclone/Koha/Database.pm line 73.
DBI connect('database=;host=;port=','',...) failed: Access denied for user 'koha'@'localhost' (using password: NO) at /usr/share/perl5/DBIx/Class/Storage/DBI.pm line 1249
DBIx::Class::Storage::DBI::dbh(): DBI Connection failed: Access denied for user 'koha'@'localhost' (using password: NO) at /usr/share/perl5/DBIx/Class/Storage/DBI.pm line 1253. at /home/koha/devkohaclone/Koha/Database.pm line 90

To reproduce on command line:

0) ensure that you have fastmmap perl module installed (libcache-fastmmap-perl in debian)
1) export CACHING_SYSTEM=fastmmap
2) export GATEWAY_INTERFACE=1
3) try to run this simple script:

#!/usr/bin/perl

use Modern::Perl;
use C4::Biblio;
GetMarcStructure();
Comment 1 Jacek Ablewicz 2016-03-14 16:38:08 UTC
See also: Bug 11998 comments #114 - #123
Comment 2 Jacek Ablewicz 2016-03-14 16:47:55 UTC
Personally, I opt for leaving it as is (i.e. broken) for the time being. At least that way we will gather some info regarding prevalence of this caching system in real-world koha installations ;)
Comment 3 Martin Renvoize 2016-03-15 06:36:33 UTC
I've been asking myself the question of 'whose using all these different caching systems?' for a while now. We seem to needlessly complicate our caching by supporting so many options (and we even removed the use of CHI to do it!)

+1 for leave it broken, then maybe we'll actually find someone who might be using it ;)
Comment 4 Jonathan Druart 2016-03-15 09:15:51 UTC
(In reply to Jacek Ablewicz from comment #2)
> Personally, I opt for leaving it as is (i.e. broken) for the time being. At
> least that way we will gather some info regarding prevalence of this caching
> system in real-world koha installations ;)

It's a bit rude but I totally support this idea.
Comment 5 Marcel de Rooy 2018-05-03 13:10:19 UTC
Cant we get information about that via HEA? Although HEA is not complete of course, but to be rude too if you do not join HEA, do not complain that we did not know that you were still using it..
Comment 6 Katrin Fischer 2018-05-04 05:42:54 UTC
(In reply to Marcel de Rooy from comment #5)
> Cant we get information about that via HEA? Although HEA is not complete of
> course, but to be rude too if you do not join HEA, do not complain that we
> did not know that you were still using it..

Hea can only show what we built into it to show... we'd need to add information about caching and then wait for people to actually update.

If it's broken, why not deprecate it with a note in the release notes? Are good reasons someone would not just switch to a better (memcached?) one?
Comment 7 Jonathan Druart 2018-12-07 14:53:03 UTC
With bug 21955 removing Cache::Memory maybe it's time to remove FastMmap as well?
Comment 8 Martin Renvoize 2018-12-10 13:06:25 UTC
I think we can fairly safely remove this option too.. if it's been broken for 2 years already it's not really all that likely it's being used in production surely!
Comment 9 Jonathan Druart 2018-12-17 16:00:57 UTC
Created attachment 83304 [details] [review]
Bug 16067: Remove FastMmap
Comment 10 Jonathan Druart 2020-11-25 14:51:16 UTC
Created attachment 113990 [details] [review]
Bug 16067: Remove FastMmap

It is known to be broken, we should remove its implementation
Comment 11 Martin Renvoize 2020-11-26 08:35:29 UTC
Created attachment 114003 [details] [review]
Bug 16067: Remove FastMmap

It is known to be broken, we should remove its implementation

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 12 Martin Renvoize 2020-11-26 08:36:08 UTC
Fast QAing this one, it's simple tidy up, works as expected, passes QA scripts and tests all pass..

Passing QA
Comment 13 Jonathan Druart 2020-12-04 16:04:41 UTC Comment hidden (obsolete)
Comment 14 Fridolin Somers 2020-12-07 08:44:00 UTC
Pushed to 20.11.x for 20.11.01

RIP ;)
Comment 15 Jonathan Druart 2020-12-07 16:56:28 UTC
Pushed to master for 21.05, thanks to everybody involved!
Comment 16 Andrew Fuerste-Henry 2020-12-15 21:45:46 UTC
Pushed to 20.05.x for 20.05.07
Comment 17 Victor Grousset/tuxayo 2020-12-17 14:03:18 UTC
Not backported to oldoldstable (19.11.x). Feel free to ask if it's needed.