[Koha-bugs] [Bug 11998] Syspref caching issues

2017-10-24 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11998

Olli-Antti Kivilahti  changed:

   What|Removed |Added

   See Also||https://bugs.koha-community
   ||.org/bugzilla3/show_bug.cgi
   ||?id=19523

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 11998] Syspref caching issues

2016-06-16 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11998

Jacek Ablewicz  changed:

   What|Removed |Added

 Blocks||16758


Referenced Bugs:

https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16758
[Bug 16758] Caching issues in scripts running in daemon mode
-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 11998] Syspref caching issues

2016-05-05 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11998

Marjorie Barry-Vila  changed:

   What|Removed |Added

 CC||marjorie.barry-v...@ccsr.qc
   ||.ca

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 11998] Syspref caching issues

2016-04-25 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11998

--- Comment #179 from Jacek Ablewicz  ---
(In reply to Jacek Ablewicz from comment #166)

> Regarding possible circular dependencies issues mentioned in the whole lot
> of the previous comments: there is 1+ circular dependency somewhere in
> current master (perl -wc C4/Context.pm test does not pass), but it's not
> caused by the final patch set from this report. Can't exclude the posibility
> that this patch set may be adding another one (it certainly has some
> potential), but it's hard to judge at the moment - let's deal with it later
> if necessary.

Looks like there are 2+ circular dependencies in Context.pm currently
(unrelated to this bug raport)

1) C4::Context -> Koha::Config::SysPref[s] -> Koha::Database -> C4::Context
2) C4::Context -> Koha::Config::SysPref[s] -> C4::Log -> C4::Context

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 11998] Syspref caching issues

2016-03-30 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11998

--- Comment #178 from Srdjan Jankovic  ---
Thanks Jonathan, a rebase issue, an extra C4::Context->preference
("SillyPreference") call got in between somehow.
Cheers, Srdjan

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 11998] Syspref caching issues

2016-03-30 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11998

--- Comment #177 from Jonathan Druart  
---
(In reply to Srdjan Jankovic from comment #176)
> Jonathan, I'm having problems with t/db_dependent/Context.t test 35 (line
> 97) where you reverted logic. Can you please double check it for me, cause
> it looks to me that the previous version was ok.
> Much obliged.

Are you talking about
 99 C4::Context->enable_syspref_cache();
100 is(C4::Context->preference("SillyPreference"), 'thing3', "Retrieved syspref
(value='thing3') successfully from cache");
101 isnt( $trace_read, q{}, 'The pref should be retrieved from the database if
the cache has been enabled');
102 $trace_read = q{};
?

C4::Context->enable_syspref_cache will clear the syspref cache, so we will need
to access the DB to retrieve the value of the pref.

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 11998] Syspref caching issues

2016-03-29 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11998

Srdjan Jankovic  changed:

   What|Removed |Added

 CC||srd...@catalyst.net.nz

--- Comment #176 from Srdjan Jankovic  ---
Jonathan, I'm having problems with t/db_dependent/Context.t test 35 (line 97)
where you reverted logic. Can you please double check it for me, cause it looks
to me that the previous version was ok.
Much obliged.

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 11998] Syspref caching issues

2016-03-23 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11998

--- Comment #175 from Jonathan Druart  
---
(In reply to Julian Maurice from comment #174)
> (In reply to Jonathan Druart from comment #112)
> > Created attachment 48727 [details] [review] [review]
> > Bug 11998: Make HoldsQueue.t tests pass [TO REVERT]
> > 
> > This patch should not be the way to make these tests pass.
> > The prefs should not be updated using set_preference, it will modify the
> > values in the cache.
> > 
> > I have no idea how to make them pass using the correct way, please help
> > :)
> 
> Maybe it's because the mocked preference sub is case sensitive (not verified)
> A patch fixes that on bug 16134

No, I have just checked and reverted the commit makes the tests failing on top
of bug 16134.

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 11998] Syspref caching issues

2016-03-23 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11998

Julian Maurice  changed:

   What|Removed |Added

 Blocks|16134   |

--- Comment #174 from Julian Maurice  ---
(In reply to Jonathan Druart from comment #112)
> Created attachment 48727 [details] [review]
> Bug 11998: Make HoldsQueue.t tests pass [TO REVERT]
> 
> This patch should not be the way to make these tests pass.
> The prefs should not be updated using set_preference, it will modify the
> values in the cache.
> 
> I have no idea how to make them pass using the correct way, please help
> :)

Maybe it's because the mocked preference sub is case sensitive (not verified)
A patch fixes that on bug 16134


Referenced Bugs:

https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16134
[Bug 16134] t::lib::Mocks::mock_preference should be case-insensitive
-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 11998] Syspref caching issues

2016-03-23 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11998

Julian Maurice  changed:

   What|Removed |Added

 Blocks||16134


Referenced Bugs:

https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16134
[Bug 16134] t::lib::Mocks::mock_preference should be case-insensitive
-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 11998] Syspref caching issues

2016-03-23 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11998

Julian Maurice  changed:

   What|Removed |Added

 CC||julian.maur...@biblibre.com
 Status|Pushed to Master|Pushed to Stable

--- Comment #173 from Julian Maurice  ---
Patches pushed to 3.22.x, will be in 3.22.5

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 11998] Syspref caching issues

2016-03-22 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11998

--- Comment #172 from Katrin Fischer  ---
Changed as suggested in koha-httpd.conf and restarted Apache - not the OPAC is
back :)

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 11998] Syspref caching issues

2016-03-22 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11998

--- Comment #171 from Jonathan Druart  
---
(In reply to Katrin Fischer from comment #170)
> If that's the problem - what would be the fix?

What's the value of CACHING_SYSTEM?
If it's 'fastmmap', set it to 'memcached'

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 11998] Syspref caching issues

2016-03-22 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11998

--- Comment #170 from Katrin Fischer  ---
If that's the problem - what would be the fix?

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 11998] Syspref caching issues

2016-03-22 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11998

--- Comment #169 from Jacek Ablewicz  ---
(In reply to Katrin Fischer from comment #168)
> This morning my OPAC is broken and git bisect leads to this bug. I am using
> a local git installation using localhost for the OPAC. Staff on
> localhost:8080 seems ok. The error shown is:
> 
> Software error:
> 
> DBIx::Class::Storage::DBI::catch {...} (): DBI Connection failed: Access
> denied for user 'www-data'@'localhost' (using password: NO) at
> /usr/share/perl5/DBIx/Class/Storage/DBI.pm line 1398. at
> /home/katrin/kohaclone/Koha/Database.pm line 90

Bug 16067, perhaps ?

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 11998] Syspref caching issues

2016-03-22 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11998

--- Comment #168 from Katrin Fischer  ---
This morning my OPAC is broken and git bisect leads to this bug. I am using a
local git installation using localhost for the OPAC. Staff on localhost:8080
seems ok. The error shown is:

Software error:

DBIx::Class::Storage::DBI::catch {...} (): DBI Connection failed: Access denied
for user 'www-data'@'localhost' (using password: NO) at
/usr/share/perl5/DBIx/Class/Storage/DBI.pm line 1398. at
/home/katrin/kohaclone/Koha/Database.pm line 90

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 11998] Syspref caching issues

2016-03-20 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11998

Jonathan Druart  changed:

   What|Removed |Added

 Blocks||16105


Referenced Bugs:

https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16105
[Bug 16105] Cache::Memory is loaded even if memcache is used
-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 11998] Syspref caching issues

2016-03-19 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11998

Jonathan Druart  changed:

   What|Removed |Added

 Blocks||16088


Referenced Bugs:

https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16088
[Bug 16088] Excessive CGI->new() calls hurting cache performace under plack
-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 11998] Syspref caching issues

2016-03-19 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11998

Jonathan Druart  changed:

   What|Removed |Added

 Blocks||15342


Referenced Bugs:

https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15342
[Bug 15342] Performance 3.22 - Omnibus
-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 11998] Syspref caching issues

2016-03-18 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11998

Jonathan Druart  changed:

   What|Removed |Added

 Blocks||16104

--- Comment #167 from Jonathan Druart  
---
(In reply to Jonathan Druart from comment #98)
> Patches squashed, rebased and adapted to current master.
> I have rewritten and it seems to work as expected.
> See also bug 15970, bug 15341 and bug 15873, to know why we need this patch.
> 
> Note that we still have 
> Name "Cache::RemovalStrategy::FIELDS" used only once: possible typo at
> /usr/share/perl/5.20/fields.pm line 135.
> Name "Cache::RemovalStrategy::LRU::FIELDS" used only once: possible typo at
> /usr/share/perl/5.20/fields.pm line 135.
> Name "Tie::Hash::FIELDS" used only once: possible typo at
> /usr/share/perl/5.20/fields.pm line 135.
> 
> Forget them, unless you know how to fix them.

See bug 16104 for an attempt to remove them


Referenced Bugs:

https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16104
[Bug 16104] Warnings "used only once: possible typo" should be removed
-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 11998] Syspref caching issues

2016-03-15 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11998

--- Comment #166 from Jacek Ablewicz  ---
(In reply to Jonathan Druart from comment #162)

> > Tested with CGI and CGI + memcache; some small issues still remain,
> > but it would be better to deal with them in separate bug reports
> > if necessary
> 
> Could you open a bug report for each of them (and mark them dependent on
> this one)?

Regarding possible circular dependencies issues mentioned in the whole lot of
the previous comments: there is 1+ circular dependency somewhere in current
master (perl -wc C4/Context.pm test does not pass), but it's not caused by the
final patch set from this report. Can't exclude the posibility that this patch
set may be adding another one (it certainly has some potential), but it's hard
to judge at the moment - let's deal with it later if necessary.

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 11998] Syspref caching issues

2016-03-15 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11998

Brendan Gallagher  changed:

   What|Removed |Added

 CC||bren...@bywatersolutions.co
   ||m
 Status|Passed QA   |Pushed to Master

--- Comment #165 from Brendan Gallagher  ---
Pushed to Master - Should be in the May 2016 release.  Thanks!

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 11998] Syspref caching issues

2016-03-14 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11998

--- Comment #164 from Jacek Ablewicz  ---
(In reply to Jonathan Druart from comment #162)

> > Tested with CGI and CGI + memcache; some small issues still remain,
> > but it would be better to deal with them in separate bug reports
> > if necessary
> 
> Could you open a bug report for each of them (and mark them dependent on
> this one)?

Some previously mentioned issues are filled under Bug 16067 and Bug 16070, and
one additional, not previously mentioned, in Bug 16068. To be quite frank - I
have not retested them with the current/final patch set, just eyeballed the
code and maked an educated guess that they will still be valid ;)

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 11998] Syspref caching issues

2016-03-14 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11998

Jacek Ablewicz  changed:

   What|Removed |Added

 Blocks||16070


Referenced Bugs:

https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16070
[Bug 16070] Empty (undef) system preferences may cause some issues in
combination with memcache
-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 11998] Syspref caching issues

2016-03-14 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11998

Jacek Ablewicz  changed:

   What|Removed |Added

 Blocks||16068


Referenced Bugs:

https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16068
[Bug 16068] System preference override feature (OVERRIDE_SYSPREF_* = ) is not
reliable for some cache systems
-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 11998] Syspref caching issues

2016-03-14 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11998

Jacek Ablewicz  changed:

   What|Removed |Added

 Blocks||16067


Referenced Bugs:

https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16067
[Bug 16067] Koha::Cache, fastmmap caching system is broken
-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 11998] Syspref caching issues

2016-03-14 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11998

--- Comment #163 from Jacek Ablewicz  ---
To summarize briefly an impact of this patch, regarding performance:

1) CGI + Cache::Memory: small loss (10-15 miliseconds on average ?), due to
~100 unnecessary get_from_cache()/set_in_cache() calls per script
2) CGI + memcache: significant speed gain (150-200 ms) + reduced mysql load
3) plack + memcache: huge gain (at least 200-500 ms on average, up to 10+
seconds in some circumstances) + vastly reduced mysql load

Issue 1) is easilly fixable, but it would be better (and a lot easier) to do it
on the architectural level (i.e. inside Bug 16044, after it gathers momentum).

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 11998] Syspref caching issues

2016-03-14 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11998

Tomás Cohen Arazi  changed:

   What|Removed |Added

 Status|Signed Off  |Passed QA

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/

[Koha-bugs] [Bug 11998] Syspref caching issues

2016-03-14 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11998

--- Comment #162 from Jonathan Druart  
---
(In reply to Jacek Ablewicz from comment #153)

Thanks a lot Jacek for your signoff!

> Tested with CGI and CGI + memcache; some small issues still remain,
> but it would be better to deal with them in separate bug reports
> if necessary

Could you open a bug report for each of them (and mark them dependent on this
one)?

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 11998] Syspref caching issues

2016-03-14 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11998

Jacek Ablewicz  changed:

   What|Removed |Added

  Attachment #49023|0   |1
is obsolete||

--- Comment #154 from Jacek Ablewicz  ---
Created attachment 49101
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=49101=edit
Bug 11998: Use t::lib::Mocks::mock_preference in tests

Unless in t/db_dependent/Context.t where we want to test the cache
behaviors.

Signed-off-by: Tomas Cohen Arazi 
Signed-off-by: Jacek Ablewicz 

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 11998] Syspref caching issues

2016-03-14 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11998

Jacek Ablewicz  changed:

   What|Removed |Added

  Attachment #49028|0   |1
is obsolete||

--- Comment #159 from Jacek Ablewicz  ---
Created attachment 49106
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=49106=edit
Bug 11998: follow-up for the debian package psgi file

Signed-off-by: Tomas Cohen Arazi 
Signed-off-by: Jacek Ablewicz 

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 11998] Syspref caching issues

2016-03-14 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11998

Jacek Ablewicz  changed:

   What|Removed |Added

  Attachment #49029|0   |1
is obsolete||

--- Comment #160 from Jacek Ablewicz  ---
Created attachment 49107
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=49107=edit
Bug 11998: Add a L1 cache for sysprefs

Accessing to the cache for each call to C4::Context->preference might
have an impact on performances.
To avoid that this patch introduces a L1 cache (simple hashref). It will
be populated by accessing the L2 cache (Koha::Cache).
If a pref is retrieved 10x, the first one will get the value from the L2
cache, then the L1 cache will be check.
To do so we will need to clear the L1 cache every time a page is loaded.

Signed-off-by: Tomas Cohen Arazi 
Signed-off-by: Jacek Ablewicz 

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 11998] Syspref caching issues

2016-03-14 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11998

Jacek Ablewicz  changed:

   What|Removed |Added

  Attachment #49030|0   |1
is obsolete||

--- Comment #161 from Jacek Ablewicz  ---
Created attachment 49108
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=49108=edit
Bug 11998: Clear L1 cache from psgi files

Signed-off-by: Tomas Cohen Arazi 
Signed-off-by: Jacek Ablewicz 

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 11998] Syspref caching issues

2016-03-14 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11998

Jacek Ablewicz  changed:

   What|Removed |Added

  Attachment #49025|0   |1
is obsolete||

--- Comment #156 from Jacek Ablewicz  ---
Created attachment 49103
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=49103=edit
Bug 11998: Make HoldsQueue.t tests pass [TO REVERT]

This patch should not be the way to make these tests pass.
The prefs should not be updated using set_preference, it will modify the
values in the cache.

I have no idea how to make them pass using the correct way, please help
:)

Signed-off-by: Tomas Cohen Arazi 
Signed-off-by: Jacek Ablewicz 

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 11998] Syspref caching issues

2016-03-14 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11998

Jacek Ablewicz  changed:

   What|Removed |Added

  Attachment #49026|0   |1
is obsolete||

--- Comment #157 from Jacek Ablewicz  ---
Created attachment 49104
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=49104=edit
Bug 11998: Do not clear syspref cache in psgi file

This in only in koha.psgi, it has been introduced by bug 13815 but
should not have been added by this patch.

Removing it should not introduce any changes.
Not that it won't impact debian packages.

Signed-off-by: Tomas Cohen Arazi 
Signed-off-by: Jacek Ablewicz 

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 11998] Syspref caching issues

2016-03-14 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11998

Jacek Ablewicz  changed:

   What|Removed |Added

  Attachment #49027|0   |1
is obsolete||

--- Comment #158 from Jacek Ablewicz  ---
Created attachment 49105
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=49105=edit
Bug 11998: Revert "Bug 13805: (Plack) Disable syspref cache"

This reverts commit ca00f0ddaeb76106b4aa274fd1848844ae042f58.

Bug 13805 fixes an installer bug by disabling the syspref cache.
It was not a good idea, it introduced performance issues (see bug 13805
comment 14).

Test plan:
Test plan:
0/ Create a new database and fill the database entry in the koha conf
with its name
1/ Go on the mainpage, you should be redirected to the installer
2/ Try to log in
You should not get the login form again.

Signed-off-by: Tomas Cohen Arazi 
Signed-off-by: Jacek Ablewicz 
Test plan not followed by me for this patch, due to lack of working
plack setup, but I don't expect it to cause any problems, and performace
gain for plack will be tremendous

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 11998] Syspref caching issues

2016-03-14 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11998

Jacek Ablewicz  changed:

   What|Removed |Added

  Attachment #49022|0   |1
is obsolete||

--- Comment #153 from Jacek Ablewicz  ---
Created attachment 49100
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=49100=edit
Bug 11998: Use Koha::Cache to cache sysprefs

At the moment, the sysprefs are only cache in the thread memory
executing the processus
When using Plack, that means we need to clear the syspref cache on each
page.
To avoid that, we can use Koha::Cache to cache the sysprefs correctly.

A big part of the authorship of this patch goes to Robin Sheat.

Test plan:
1/ Add/Update/Delete local use prefs
2/ Update pref values and confirm that the changes are correctly taken
into account

Signed-off-by: Chris 

Signed-off-by: Josef Moravec 
Tested with plack with syspref cache enabled, there is some time between
setting the syspref and applying it, but it takes just one reload of page, it
shouldn't be problem, should it?
Signed-off-by: Tomas Cohen Arazi 

Signed-off-by: Jacek Ablewicz 
Tested with CGI and CGI + memcache; some small issues still remain,
but it would be better to deal with them in separate bug reports
if necessary

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 11998] Syspref caching issues

2016-03-14 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11998

Jacek Ablewicz  changed:

   What|Removed |Added

  Attachment #49024|0   |1
is obsolete||

--- Comment #155 from Jacek Ablewicz  ---
Created attachment 49102
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=49102=edit
Bug 11998: Use C4::Context->preference in Koha/Schema/Result/Item.pm

Otherwise some tests won't pass

Signed-off-by: Tomas Cohen Arazi 
Signed-off-by: Jacek Ablewicz 

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 11998] Syspref caching issues

2016-03-11 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11998

--- Comment #152 from Jonathan Druart  
---
Jacek, I am interesting by your signoff if you think I am in the right
direction with the L1 cache.

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 11998] Syspref caching issues

2016-03-11 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11998

Tomás Cohen Arazi  changed:

   What|Removed |Added

 Status|In Discussion   |Signed Off

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/

[Koha-bugs] [Bug 11998] Syspref caching issues

2016-03-11 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11998

Tomás Cohen Arazi  changed:

   What|Removed |Added

  Attachment #48935|0   |1
is obsolete||

--- Comment #150 from Tomás Cohen Arazi  ---
Created attachment 49029
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=49029=edit
Bug 11998: Add a L1 cache for sysprefs

Accessing to the cache for each call to C4::Context->preference might
have an impact on performances.
To avoid that this patch introduces a L1 cache (simple hashref). It will
be populated by accessing the L2 cache (Koha::Cache).
If a pref is retrieved 10x, the first one will get the value from the L2
cache, then the L1 cache will be check.
To do so we will need to clear the L1 cache every time a page is loaded.

Signed-off-by: Tomas Cohen Arazi 

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/

[Koha-bugs] [Bug 11998] Syspref caching issues

2016-03-11 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11998

Tomás Cohen Arazi  changed:

   What|Removed |Added

  Attachment #48961|0   |1
is obsolete||

--- Comment #151 from Tomás Cohen Arazi  ---
Created attachment 49030
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=49030=edit
Bug 11998: Clear L1 cache from psgi files

Signed-off-by: Tomas Cohen Arazi 

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/

[Koha-bugs] [Bug 11998] Syspref caching issues

2016-03-11 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11998

Tomás Cohen Arazi  changed:

   What|Removed |Added

  Attachment #48932|0   |1
is obsolete||

--- Comment #147 from Tomás Cohen Arazi  ---
Created attachment 49026
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=49026=edit
Bug 11998: Do not clear syspref cache in psgi file

This in only in koha.psgi, it has been introduced by bug 13815 but
should not have been added by this patch.

Removing it should not introduce any changes.
Not that it won't impact debian packages.

Signed-off-by: Tomas Cohen Arazi 

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/

[Koha-bugs] [Bug 11998] Syspref caching issues

2016-03-11 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11998

Tomás Cohen Arazi  changed:

   What|Removed |Added

  Attachment #48933|0   |1
is obsolete||

--- Comment #148 from Tomás Cohen Arazi  ---
Created attachment 49027
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=49027=edit
Bug 11998: Revert "Bug 13805: (Plack) Disable syspref cache"

This reverts commit ca00f0ddaeb76106b4aa274fd1848844ae042f58.

Bug 13805 fixes an installer bug by disabling the syspref cache.
It was not a good idea, it introduced performance issues (see bug 13805
comment 14).

Test plan:
Test plan:
0/ Create a new database and fill the database entry in the koha conf
with its name
1/ Go on the mainpage, you should be redirected to the installer
2/ Try to log in
You should not get the login form again.

Signed-off-by: Tomas Cohen Arazi 

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/

[Koha-bugs] [Bug 11998] Syspref caching issues

2016-03-11 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11998

Tomás Cohen Arazi  changed:

   What|Removed |Added

  Attachment #48931|0   |1
is obsolete||

--- Comment #146 from Tomás Cohen Arazi  ---
Created attachment 49025
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=49025=edit
Bug 11998: Make HoldsQueue.t tests pass [TO REVERT]

This patch should not be the way to make these tests pass.
The prefs should not be updated using set_preference, it will modify the
values in the cache.

I have no idea how to make them pass using the correct way, please help
:)

Signed-off-by: Tomas Cohen Arazi 

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/

[Koha-bugs] [Bug 11998] Syspref caching issues

2016-03-11 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11998

Tomás Cohen Arazi  changed:

   What|Removed |Added

  Attachment #48934|0   |1
is obsolete||

--- Comment #149 from Tomás Cohen Arazi  ---
Created attachment 49028
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=49028=edit
Bug 11998: follow-up for the debian package psgi file

Signed-off-by: Tomas Cohen Arazi 

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/

[Koha-bugs] [Bug 11998] Syspref caching issues

2016-03-11 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11998

Tomás Cohen Arazi  changed:

   What|Removed |Added

  Attachment #48930|0   |1
is obsolete||

--- Comment #145 from Tomás Cohen Arazi  ---
Created attachment 49024
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=49024=edit
Bug 11998: Use C4::Context->preference in Koha/Schema/Result/Item.pm

Otherwise some tests won't pass

Signed-off-by: Tomas Cohen Arazi 

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/

[Koha-bugs] [Bug 11998] Syspref caching issues

2016-03-11 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11998

Tomás Cohen Arazi  changed:

   What|Removed |Added

  Attachment #48929|0   |1
is obsolete||

--- Comment #144 from Tomás Cohen Arazi  ---
Created attachment 49023
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=49023=edit
Bug 11998: Use t::lib::Mocks::mock_preference in tests

Unless in t/db_dependent/Context.t where we want to test the cache
behaviors.

Signed-off-by: Tomas Cohen Arazi 

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/

[Koha-bugs] [Bug 11998] Syspref caching issues

2016-03-11 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11998

Tomás Cohen Arazi  changed:

   What|Removed |Added

  Attachment #48928|0   |1
is obsolete||

--- Comment #143 from Tomás Cohen Arazi  ---
Created attachment 49022
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=49022=edit
Bug 11998: Use Koha::Cache to cache sysprefs

At the moment, the sysprefs are only cache in the thread memory
executing the processus
When using Plack, that means we need to clear the syspref cache on each
page.
To avoid that, we can use Koha::Cache to cache the sysprefs correctly.

A big part of the authorship of this patch goes to Robin Sheat.

Test plan:
1/ Add/Update/Delete local use prefs
2/ Update pref values and confirm that the changes are correctly taken
into account

Signed-off-by: Chris 

Signed-off-by: Josef Moravec 
Tested with plack with syspref cache enabled, there is some time between
setting the syspref and applying it, but it takes just one reload of page, it
shouldn't be problem, should it?
Signed-off-by: Tomas Cohen Arazi 

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/

[Koha-bugs] [Bug 11998] Syspref caching issues

2016-03-10 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11998

Jonathan Druart  changed:

   What|Removed |Added

 Blocks||16044


Referenced Bugs:

https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16044
[Bug 16044] Define a L2 cache for all objects set in cache
-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 11998] Syspref caching issues

2016-03-10 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11998

Jonathan Druart  changed:

   What|Removed |Added

  Attachment #48936|0   |1
is obsolete||

--- Comment #142 from Jonathan Druart  
---
Created attachment 48961
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=48961=edit
Bug 11998: Clear L1 cache from psgi files

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 11998] Syspref caching issues

2016-03-10 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11998

Jonathan Druart  changed:

   What|Removed |Added

   See Also||https://bugs.koha-community
   ||.org/bugzilla3/show_bug.cgi
   ||?id=15263

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 11998] Syspref caching issues

2016-03-10 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11998

--- Comment #141 from Jonathan Druart  
---
*** Bug 15973 has been marked as a duplicate of this bug. ***

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 11998] Syspref caching issues

2016-03-10 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11998

--- Comment #140 from Jonathan Druart  
---
*** Bug 15970 has been marked as a duplicate of this bug. ***

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 11998] Syspref caching issues

2016-03-10 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11998

Jonathan Druart  changed:

   What|Removed |Added

 Blocks|15970, 15973|
   See Also||https://bugs.koha-community
   ||.org/bugzilla3/show_bug.cgi
   ||?id=15970


Referenced Bugs:

https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15970
[Bug 15970] Plack should not clear syspref cache
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15973
[Bug 15973] Do not disable syspref cache for Plack
-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 11998] Syspref caching issues

2016-03-10 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11998

Jonathan Druart  changed:

   What|Removed |Added

 Status|Signed Off  |In Discussion

--- Comment #139 from Jonathan Druart  
---
(In reply to Jacek Ablewicz from comment #128)
> implementing cache with 2+ levels (1st level being a simple hash or
> CHI::Driver::RawMemory for example, and 2nd level - memcache etc.)

I really like this idea, I have implemented it in the last 2 patches.
I have also moved patches from bug 15970 and bug 15973 to this one (they should
be pushed altogether).

How do you measure your results? Do you have a script to share?

Putting to 'in discussion'.

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 11998] Syspref caching issues

2016-03-10 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11998

--- Comment #138 from Jonathan Druart  
---
Created attachment 48936
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=48936=edit
Bug 11998: Clear L1 cache from psgi files

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 11998] Syspref caching issues

2016-03-10 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11998

--- Comment #133 from Jonathan Druart  
---
Created attachment 48931
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=48931=edit
Bug 11998: Make HoldsQueue.t tests pass [TO REVERT]

This patch should not be the way to make these tests pass.
The prefs should not be updated using set_preference, it will modify the
values in the cache.

I have no idea how to make them pass using the correct way, please help
:)

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 11998] Syspref caching issues

2016-03-10 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11998

--- Comment #137 from Jonathan Druart  
---
Created attachment 48935
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=48935=edit
Bug 11998: Add a L1 cache for sysprefs

Accessing to the cache for each call to C4::Context->preference might
have an impact on performances.
To avoid that this patch introduces a L1 cache (simple hashref). It will
be populated by accessing the L2 cache (Koha::Cache).
If a pref is retrieved 10x, the first one will get the value from the L2
cache, then the L1 cache will be check.
To do so we will need to clear the L1 cache every time a page is loaded.

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 11998] Syspref caching issues

2016-03-10 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11998

--- Comment #136 from Jonathan Druart  
---
Created attachment 48934
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=48934=edit
Bug 11998: follow-up for the debian package psgi file

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 11998] Syspref caching issues

2016-03-10 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11998

--- Comment #134 from Jonathan Druart  
---
Created attachment 48932
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=48932=edit
Bug 11998: Do not clear syspref cache in psgi file

This in only in koha.psgi, it has been introduced by bug 13815 but
should not have been added by this patch.

Removing it should not introduce any changes.
Not that it won't impact debian packages.

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 11998] Syspref caching issues

2016-03-10 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11998

--- Comment #135 from Jonathan Druart  
---
Created attachment 48933
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=48933=edit
Bug 11998: Revert "Bug 13805: (Plack) Disable syspref cache"

This reverts commit ca00f0ddaeb76106b4aa274fd1848844ae042f58.

Bug 13805 fixes an installer bug by disabling the syspref cache.
It was not a good idea, it introduced performance issues (see bug 13805
comment 14).

Test plan:
Test plan:
0/ Create a new database and fill the database entry in the koha conf
with its name
1/ Go on the mainpage, you should be redirected to the installer
2/ Try to log in
You should not get the login form again.

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 11998] Syspref caching issues

2016-03-10 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11998

--- Comment #132 from Jonathan Druart  
---
Created attachment 48930
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=48930=edit
Bug 11998: Use C4::Context->preference in Koha/Schema/Result/Item.pm

Otherwise some tests won't pass

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 11998] Syspref caching issues

2016-03-10 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11998

--- Comment #131 from Jonathan Druart  
---
Created attachment 48929
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=48929=edit
Bug 11998: Use t::lib::Mocks::mock_preference in tests

Unless in t/db_dependent/Context.t where we want to test the cache
behaviors.

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 11998] Syspref caching issues

2016-03-10 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11998

Jonathan Druart  changed:

   What|Removed |Added

  Attachment #48655|0   |1
is obsolete||
  Attachment #48687|0   |1
is obsolete||
  Attachment #48688|0   |1
is obsolete||
  Attachment #48727|0   |1
is obsolete||

--- Comment #130 from Jonathan Druart  
---
Created attachment 48928
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=48928=edit
Bug 11998: Use Koha::Cache to cache sysprefs

At the moment, the sysprefs are only cache in the thread memory
executing the processus
When using Plack, that means we need to clear the syspref cache on each
page.
To avoid that, we can use Koha::Cache to cache the sysprefs correctly.

A big part of the authorship of this patch goes to Robin Sheat.

Test plan:
1/ Add/Update/Delete local use prefs
2/ Update pref values and confirm that the changes are correctly taken
into account

Signed-off-by: Chris 

Signed-off-by: Josef Moravec 
Tested with plack with syspref cache enabled, there is some time between
setting the syspref and applying it, but it takes just one reload of page, it
shouldn't be problem, should it?

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 11998] Syspref caching issues

2016-03-09 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11998

--- Comment #129 from Jacek Ablewicz  ---
(In reply to Jacek Ablewicz from comment #126)
> (In reply to Jonathan Druart from comment #125)
> > Hi Jacek,
> > Did you try to profile a "real life" situation?
> 
> catalogue/search.pl (159 search results, w/ 50 results displayed per page)
> 
> It calls ->preference() 808 times, fetching 84 different preferences.

If I enable search results XSLT processing, the same test causes 2706
preference() calls and 102 different preferences being fetched.. So, this patch
set in its current form, in that particular scenario, will "cost" us at least
an extra 200-250 msec for the default Cache::Memory caching system and ~100
msec for memcached.

BTW: those usec/msec values I posted in this bug report are for tests performed
on (still, relativelly) fast server (i7-3770 + 32GB RAM).

BTW #2: Bug 15263 looks like a very good start for remeding excessive
preference() calls involved in search results XSLT processing - but I bet that
it is not the only scenario when a lot of excessive preference() calls happens
in Koha.

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 11998] Syspref caching issues

2016-03-09 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11998

--- Comment #128 from Jacek Ablewicz  ---
(In reply to Jacek Ablewicz from comment #126)

> 3) with patch & default caching system (Cache::Memory): 98 ms + 70 ms spent
> in ->get_from_cache()

+ 10 ms spent in ->set_in_cache() - sorry, forgot to include that statement run
time

Conclusion: Cache::Memory is not very efficient when used to store a lot of
simple variables - probably because:

- it's pure perl (?)
- we currently serialize/deserialize all data types (including scalars) with
freeze()/thaw() when using Cache::Memory

Memcache is better (up to 2x on average) for simple variables - it's XS, and it
serializes only complex data structures, but there is (more or less constant)
40usec penalty involved due to network latency/turnaround.

Both chache systems are quite terrible for caching big, complex data structures
(one MARC framework: 900 kilobytes; Cache::Memory is a bit faster then memcache
in this case), mostly because they need to deserialize those structures each
time when the data is fetched. We can try to use better serializer (Sereal
etc.) - it may help speed up things for memcache (MARC framework storage size
will go down to 300-100KB), but there is virtually nothing we can do to improve
deserialization time. Instead, one can avoid doing the same expensive operation
50x times per script run, i.e. by implementing cache with 2+ levels (1st level
being a simple hash or CHI::Driver::RawMemory for example, and 2nd level -
memcache etc.)

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 11998] Syspref caching issues

2016-03-09 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11998

--- Comment #127 from Jacek Ablewicz  ---
(In reply to Jacek Ablewicz from comment #121)

> C4::Context::read_config_file() is apparently called 2+ times per script run
> allready:
> 
>- 1st time when we do 'use Koha::Context;' anywhere
>- 2nd time when we intialize the database connection in Koha::Database
> via schema() / _new_schema() sub

and 3rd time in C4/Auth_with_cas.pm (line 40)

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 11998] Syspref caching issues

2016-03-09 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11998

--- Comment #126 from Jacek Ablewicz  ---
(In reply to Jonathan Druart from comment #125)
> Hi Jacek,
> Did you try to profile a "real life" situation?

catalogue/search.pl (159 search results, w/ 50 results displayed per page)

It calls ->preference() 808 times, fetching 84 different preferences.

Total time spent in ->preference() calls (excluding 1st call which triggers
DBIx class loading = 250-300ms on this test server)

1) without patch, current master: 98 ms
2) without patch, Bug 13967 reverted: 11 ms
3) with patch & default caching system (Cache::Memory): 98 ms + 70 ms spent in 
->get_from_cache()
4) with patch & memcached: 34 ms spent in ->get_from_cache()

I have no idea how "typical" is that particular example... I expect that a
given script will use somewhere around 50-100 different system preferences, but
how many times will ->preference() be called on average is pretty much
impossible to estimate (200 ... 1000 ... 2000 ?)

Re/ caching system penalty in general - this patch will be probably not the
biggest offender though; for example, Bug 11842 had bigger impact on
catalogue/search.pl (150-350ms) - deserialising big, complex data structures in
perl turns out to be quite expensive (especially if you do it 50 times per
script run, like in this case).

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 11998] Syspref caching issues

2016-03-08 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11998

--- Comment #125 from Jonathan Druart  
---
Hi Jacek,
Did you try to profile a "real life" situation?
I think it would make sense to use NYTProf on different pages, with bug 15973
and bug 15970 (if needed) applied.

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 11998] Syspref caching issues

2016-03-08 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11998

--- Comment #124 from Jacek Ablewicz  ---
Some (not very scientific) cache performace tests below. I measured
C4::Context->preference() calls; 3 scenarios:

A) feching 1 small syspref (marcflavour) over and over - syspref cache (almost)
unpopulated
B) feching 'marcflavour', cache fully populated (all 545 system preferencers in
cache)
C) feching all system prefrences in alphabetical order, cache fully populated,
average time spent in ->preference() call / per preference

Results (A / B / C):

- without patch (syspref cache = perl hashref): 1.1us / 1.1us / 0.9us
- Cache::Memory: 36us / 53us / 110us
- memcached: 41us / 41us / 42us
- fastmmap: 14us / 16us / 60us
- mysql query cache (256MB, DBI): ... / 130us / 135us
- mysql query cache (256MB, DBIx): ... / 1.20ms / 1.20ms

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 11998] Syspref caching issues

2016-03-07 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11998

--- Comment #123 from Jacek Ablewicz  ---
(In reply to Jacek Ablewicz from comment #122)
> Created attachment 48758 [details] [review]
> Bug 11998: Delay cache intialisation
> 
> Should solve a problem with fastmmap cache system (see comment #114)

Maybe not such a good idea after all - to work correctly it would need
additional numerous changes in other subroutines like clear_syspref_cache(),
set_preference() etc.

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 11998] Syspref caching issues

2016-03-07 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11998

Jacek Ablewicz  changed:

   What|Removed |Added

  Attachment #48758|0   |1
is obsolete||

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 11998] Syspref caching issues

2016-03-07 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11998

--- Comment #122 from Jacek Ablewicz  ---
Created attachment 48758
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=48758=edit
Bug 11998: Delay cache intialisation

Should solve a problem with fastmmap cache system (see comment #114)

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 11998] Syspref caching issues

2016-03-07 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11998

--- Comment #121 from Jacek Ablewicz  ---
(In reply to Jonathan Druart from comment #120)
> (In reply to Jonathan Druart from comment #119)
> > Actually it's certainly caused by the circular dependency.
> 
> Koha::Cache::_initialize_fastmmap could read the config file instead of
> calling C4::Context->config.

IMO delaying cache init / moving Koha::Cache->get_instance() call into
preference() sub may be a better idea. Especially as in current master
C4::Context::read_config_file() is apparently called 2+ times per script run
allready:

   - 1st time when we do 'use Koha::Context;' anywhere
   - 2nd time when we intialize the database connection in Koha::Database via
schema() / _new_schema() sub

:)

> But the question is: Does someone use fasmmap?

Probably not (but thats the only shared / permanent caching system available
apart from memcache - which has its own quirks and constraints). I only
encountered this problem because I was curious how would the 3 different
caching systems compare performance-wise, since we are going to use them for
something so much speed-sensitive (i.e preference fetching).

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 11998] Syspref caching issues

2016-03-07 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11998

--- Comment #120 from Jonathan Druart  
---
(In reply to Jonathan Druart from comment #119)
> Actually it's certainly caused by the circular dependency.

Koha::Cache::_initialize_fastmmap could read the config file instead of calling
C4::Context->config.
But the question is: Does someone use fasmmap?

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 11998] Syspref caching issues

2016-03-07 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11998

--- Comment #119 from Jonathan Druart  
---
Actually it's certainly caused by the circular dependency.

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 11998] Syspref caching issues

2016-03-07 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11998

--- Comment #118 from Jonathan Druart  
---
And also this one!!

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 11998] Syspref caching issues

2016-03-07 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11998

--- Comment #117 from Jonathan Druart  
---
(In reply to Jacek Ablewicz from comment #114)
> I'm unable to test this patch set with fastmmap caching system - it seems to
> break it somehow.. With patch, and fastmmap cache enabled, anything (?) that
> uses Koha::Cache results with:
> 
> 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) apply patch (without patch: no error in current master)
> 2) export CACHING_SYSTEM=fastmmap
> 3) export GATEWAY_INTERFACE=1
> 4) try to run this simple script:
> 
> #!/usr/bin/perl
> 
> use Modern::Perl;
> use C4::Biblio;
> GetMarcStructure();

It works if I revert
commit 9e701294dd6ccf4fa5d8b24d1a7da15be353992e
Bug 13431 - Shared FastMmap file causes issues
No idea why!

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 11998] Syspref caching issues

2016-03-07 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11998

--- Comment #116 from Jonathan Druart  
---
Sorry, forget this last comment (I was using master... :D)

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 11998] Syspref caching issues

2016-03-07 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11998

--- Comment #115 from Jonathan Druart  
---
(In reply to Jacek Ablewicz from comment #114)
> I'm unable to test this patch set with fastmmap caching system - it seems to
> break it somehow.. With patch, and fastmmap cache enabled, anything (?) that
> uses Koha::Cache results with:
> 
> 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) apply patch (without patch: no error in current master)
> 2) export CACHING_SYSTEM=fastmmap
> 3) export GATEWAY_INTERFACE=1
> 4) try to run this simple script:
> 
> #!/usr/bin/perl
> 
> use Modern::Perl;
> use C4::Biblio;
> GetMarcStructure();

I don't get the error. I don't know if I did something wrong, I don't use
fastmmap (I thought we agree it does not have good results).

% git diff
diff --git a/Koha/Cache.pm b/Koha/Cache.pm
index 9856e80..e0f406f 100644
--- a/Koha/Cache.pm
+++ b/Koha/Cache.pm
@@ -123,6 +123,7 @@ sub new {

 $ENV{DEBUG} && carp "Selected caching system: " . ($self->{'cache'} //
'none');

+use Data::Dumper;warn Dumper $self;
 return
   bless $self,
   $class;

% more t.pl
#!/usr/bin/perl
use Modern::Perl;
use C4::Biblio;
GetMarcStructure();

% perl t.pl
$VAR1 = {
  'memory_cache' => bless( {
 'size_limit' => undef,
 'namespace' => 'koha',
 'load_callback' => undef,
 'default_expires' => '0 sec',
 'removal_strategy' => bless( {},
'Cache::RemovalStrategy::LRU' ),
 'validate_callback' => undef
   }, 'Cache::Memory' ),
  'timeout' => 0,
  'namespace' => 'koha',
  'Cache::Memory_get' => sub { "DUMMY" },
  'cache' => bless( {
  'Cache' => \205625248,
  'allow_recursive' => undef,
  'share_file' =>
'/tmp/sharefile-koha-koha-localhost-koha',
  'write_back' => '',
  'context' => undef,
  'delete_cb' => undef,
  'empty_on_exit' => 0,
  'num_pages' => 89,
  'compress' => 0,
  'enable_stats' => 0,
  'raw_values' => 0,
  'write_cb' => undef,
  'read_cb' => undef,
  'cache_not_found' => undef,
  'pid' => 17602,
  'expire_time' => 0,
  'page_size' => 65536,
  'unlink_on_exit' => 0,
  'cache_size' => 5832704
}, 'Cache::FastMmap' ),
  'fastmmap_cache' => $VAR1->{'cache'},
  'Cache::Memory_set' => sub { "DUMMY" },
  'default_type' => 'fastmmap'

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 11998] Syspref caching issues

2016-03-07 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11998

--- Comment #114 from Jacek Ablewicz  ---
I'm unable to test this patch set with fastmmap caching system - it seems to
break it somehow.. With patch, and fastmmap cache enabled, anything (?) that
uses Koha::Cache results with:

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) apply patch (without patch: no error in current master)
2) export CACHING_SYSTEM=fastmmap
3) export GATEWAY_INTERFACE=1
4) try to run this simple script:

#!/usr/bin/perl

use Modern::Perl;
use C4::Biblio;
GetMarcStructure();

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 11998] Syspref caching issues

2016-03-07 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11998

--- Comment #113 from Jacek Ablewicz  ---
For sysprefs with undef value in the database - while testing with memcache -
there are 2 warnings generated:

Use of uninitialized value in subroutine entry at
/home/koha/devkohaclone/Koha/Cache.pm line 287.
Use of uninitialized value in subroutine entry at
/home/koha/devkohaclone/Koha/Cache.pm line 287.

This only happens when trying to fetch such syspref first time, from
unpopulated cache. There are 9 such values in my test database:

   CoceHost
   CoceProviders
   DefaultLongOverdueChargeValue
   DefaultLongOverdueDays
   DefaultLongOverdueLostValue
   MembershipExpiryDaysNotice
   NovelistSelectPassword
   NovelistSelectProfile
   TagsExternalDictionary

Non-existing preference fetch generates the same warning (but again only once).

Note that subsequent C4::Context->preference() calls will return empty string
for such preferences, instead of undef value - not sure if that may cause some
problems or not, but it's a change from previous behaviour. Also it does not
happen for Cache::Memory (= default caching system after this patch).

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 11998] Syspref caching issues

2016-03-07 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11998

--- Comment #112 from Jonathan Druart  
---
Created attachment 48727
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=48727=edit
Bug 11998: Make HoldsQueue.t tests pass [TO REVERT]

This patch should not be the way to make these tests pass.
The prefs should not be updated using set_preference, it will modify the
values in the cache.

I have no idea how to make them pass using the correct way, please help
:)

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 11998] Syspref caching issues

2016-03-07 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11998

Jonathan Druart  changed:

   What|Removed |Added

 Blocks||15973


Referenced Bugs:

https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15973
[Bug 15973] Do not disable syspref cache for Plack
-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 11998] Syspref caching issues

2016-03-07 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11998

Jonathan Druart  changed:

   What|Removed |Added

 Blocks||15341


Referenced Bugs:

https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15341
[Bug 15341] Performance - Retrieve all sysprefs at once
-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 11998] Syspref caching issues

2016-03-04 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11998

--- Comment #111 from Kyle M Hall  ---
This must be a caching issue. If I simply make this change:

ok( exists($queue_item->{itype}), 'item type included in queued items list (bug
5825)' );
+warn "TEST: " . C4::Context->preference("StaticHoldsQueueWeight");

The tests begin to fail on master! I think the only reasonable solution is to
mock the actual expected value for the time being and write a replacement for
HoldsQueue.t from the ground up in time.

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 11998] Syspref caching issues

2016-03-04 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11998

Kyle M Hall  changed:

   What|Removed |Added

 CC||k...@bywatersolutions.com

--- Comment #110 from Kyle M Hall  ---
At some point in the tests, StaticHoldsQueueWeight becomes zero for reasons
unknown and the unit tests rely on this bug!

t/db_dependent/HoldsQueue.t ..
1..26
ok 1 - use C4::Reserves;
ok 2 - use C4::HoldsQueue;
1 SET StaticHoldsQueueWeight: IggZam,xND8TnZydP,lfyZhGooM9 at
t/db_dependent/HoldsQueue.t line 74.
StaticHoldsQueueWeight: IggZam,xND8TnZydP,lfyZhGooM9 at
/home/vagrant/kohaclone/C4/HoldsQueue.pm line 620.
ok 3 - take from homebranch (don't use cost matrix) pick up branch
ok 4 - take from homebranch (don't use cost matrix) holding branch
ok 5 - take from homebranch (use cost matrix) pick up branch
ok 6 - take from homebranch (use cost matrix) holding branch
StaticHoldsQueueWeight: IggZam,xND8TnZydP,lfyZhGooM9 at
/home/vagrant/kohaclone/C4/HoldsQueue.pm line 620.
ok 7 - take from holdingbranch (don't use cost matrix) pick up branch
ok 8 - take from holdingbranch (don't use cost matrix) holding branch
ok 9 - take from holdingbranch (use cost matrix) pick up branch
ok 10 - take from holdingbranch (use cost matrix) holding branch
StaticHoldsQueueWeight: IggZam,xND8TnZydP,lfyZhGooM9 at
/home/vagrant/kohaclone/C4/HoldsQueue.pm line 620.
ok 11 - take from lowest cost branch (don't use cost matrix) pick up branch
ok 12 - take from lowest cost branch (don't use cost matrix) holding branch
ok 13 - take from lowest cost branch (use cost matrix) pick up branch
ok 14 - take from lowest cost branch (use cost matrix) holding branch
ok 15 - GetHoldsQueueItems
ok 16 - item type included in queued items list (bug 5825)
ok 17 - C4::HoldsQueue::least_cost_branch returns the local branch if it is in
the list of branches to pull from
StaticHoldsQueueWeight: 0 at /home/vagrant/kohaclone/C4/HoldsQueue.pm line 620.
ok 18 - Holds queue filling correct number for default holds policy 'from home
library'
ok 19 - Holds queue filling 1st correct hold for default holds policy 'from
home library'
ok 20 - Holds queue filling 2nd correct hold for default holds policy 'from
home library'
ok 21 - Is today a holiday for pickup branch
StaticHoldsQueueWeight: 0 at /home/vagrant/kohaclone/C4/HoldsQueue.pm line 620.
ok 22 - Holds not filled with items from closed libraries
StaticHoldsQueueWeight: 0 at /home/vagrant/kohaclone/C4/HoldsQueue.pm line 620.
ok 23 - Holds queue filling correct number for holds for default holds policy
'from any library'
StaticHoldsQueueWeight: 0 at /home/vagrant/kohaclone/C4/HoldsQueue.pm line 620.
ok 24 - Holds not filled with items from closed libraries
2 SET StaticHoldsQueueWeight: wVjTn,QwXVJjV,IhgDeror at
t/db_dependent/HoldsQueue.t line 395.
StaticHoldsQueueWeight: 0 at /home/vagrant/kohaclone/C4/HoldsQueue.pm line 620.
ok 25 - Bug 14297 - Holds Queue building ignoring holds where pickup & home
branch don't match and item is not from le
ok 26 - Bug 15062 - Holds queue with Transport Cost Matrix will transfer item
even if transfers disabled

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 11998] Syspref caching issues

2016-03-04 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11998

--- Comment #109 from Jonathan Druart  
---
(In reply to Jonathan Druart from comment #108)
> (In reply to Jonathan Druart from comment #105)
> > Created attachment 48687 [details] [review] [review]
> > Bug 11998: Use t::lib::Mocks::mock_preference in tests
> > 
> > Unless in t/db_dependent/Context.t where we want to test the cache
> > behaviors.
> 
> Note that tests in t/db_dependent/HoldsQueue.t  do not pass, but I have no
> idea why!

If you use this file (modified by this patch) and prove it on top of master,
they don't pass neither.

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 11998] Syspref caching issues

2016-03-04 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11998

--- Comment #108 from Jonathan Druart  
---
(In reply to Jonathan Druart from comment #105)
> Created attachment 48687 [details] [review]
> Bug 11998: Use t::lib::Mocks::mock_preference in tests
> 
> Unless in t/db_dependent/Context.t where we want to test the cache
> behaviors.

Note that tests in t/db_dependent/HoldsQueue.t  do not pass, but I have no idea
why!

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 11998] Syspref caching issues

2016-03-04 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11998

--- Comment #107 from Jonathan Druart  
---
(In reply to Jacek Ablewicz from comment #104)
> - bunch of t/* tests (quite o lot of them) is still using ->set_preference()
> insted of mock_preference() - they don't commit changes to the database, but
> running them may now result in syspref "cache poisoning", affecting
> behaviour of the other processes

Yes, that is addressed in the last 2 patches.

> - remaining code chunks which are dealing with systempreferences table
> directly (installer, updatedatabase.pl, some tests and admin/maintenance
> scripts); updatedatabase.pl seems to be OK (at least at the 1st glance), not
> sure about installer - it does call clear_syspref_cache() 1+ time, but not
> necessarily everywhere where it should do it / not at the each and every
> step (?)

Yes, we should replace them, and avoid to update/insert sysprefs during the
update DB process.

> - up to now, when a given script retrieved some preference once, it was
> guaranted that all subsequent ->preference() calls during the script run
> will return the same value; now it will always use the current value instead
> - I guess sometimes that will be a good thing, and sometimes not so much -
> but probably not very important in practical circumstances

Theoretically it could be an issue but, as you said, I don't think it could be
a problem in practice.

> Also there will be some (hopefully very) little performace hit due to
> caching system overheads (and 10 sec deafult expire in case of Cache::Memory
> - but it will affect only the long-running scripts) - how little, it remains
> to be seen ;)

In conjunction with other patches (depending on this bug report), I am
expecting a gain.

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 11998] Syspref caching issues

2016-03-04 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11998

--- Comment #105 from Jonathan Druart  
---
Created attachment 48687
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=48687=edit
Bug 11998: Use t::lib::Mocks::mock_preference in tests

Unless in t/db_dependent/Context.t where we want to test the cache
behaviors.

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 11998] Syspref caching issues

2016-03-04 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11998

--- Comment #106 from Jonathan Druart  
---
Created attachment 48688
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=48688=edit
Bug 11998: Use C4::Context->preference in Koha/Schema/Result/Item.pm

Otherwise some tests won't pass

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 11998] Syspref caching issues

2016-03-04 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11998

Marcel de Rooy  changed:

   What|Removed |Added

 CC||m.de.r...@rijksmuseum.nl

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 11998] Syspref caching issues

2016-03-04 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11998

--- Comment #104 from Jacek Ablewicz  ---
Code itself looks fine to me, but I'm a bit worried about some potential
problems this patch may introduce indirectly. As it would be now possible to
set up permanent & shared cache for system preferences (memcache, fastmmap), in
such installations we may expect some extra troubles, e.g. with:

- bunch of t/* tests (quite o lot of them) is still using ->set_preference()
insted of mock_preference() - they don't commit changes to the database, but
running them may now result in syspref "cache poisoning", affecting behaviour
of the other processes

- remaining code chunks which are dealing with systempreferences table directly
(installer, updatedatabase.pl, some tests and admin/maintenance scripts);
updatedatabase.pl seems to be OK (at least at the 1st glance), not sure about
installer - it does call clear_syspref_cache() 1+ time, but not necessarily
everywhere where it should do it / not at the each and every step (?)

- up to now, when a given script retrieved some preference once, it was
guaranted that all subsequent ->preference() calls during the script run will
return the same value; now it will always use the current value instead - I
guess sometimes that will be a good thing, and sometimes not so much - but
probably not very important in practical circumstances

Also there will be some (hopefully very) little performace hit due to caching
system overheads (and 10 sec deafult expire in case of Cache::Memory - but it
will affect only the long-running scripts) - how little, it remains to be seen
;)

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 11998] Syspref caching issues

2016-03-04 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11998

--- Comment #103 from Josef Moravec  ---
It looks like it is just 1 or 2 seconds max, so it is absolutely OK ;)

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 11998] Syspref caching issues

2016-03-04 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11998

--- Comment #102 from Jonathan Druart  
---
(In reply to Josef Moravec from comment #101)
> Tested with plack with syspref cache enabled, there is some time between
> setting the syspref and applying it, but it takes just one reload of page,
> it shouldn't be problem, should it?

Interesting, I have not noticed that.
If it's just a couple of seconds, I am sure it is fine :)

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 11998] Syspref caching issues

2016-03-04 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11998

Josef Moravec  changed:

   What|Removed |Added

  Attachment #48652|0   |1
is obsolete||

--- Comment #101 from Josef Moravec  ---
Created attachment 48655
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=48655=edit
Bug 11998: Use Koha::Cache to cache sysprefs

At the moment, the sysprefs are only cache in the thread memory
executing the processus
When using Plack, that means we need to clear the syspref cache on each
page.
To avoid that, we can use Koha::Cache to cache the sysprefs correctly.

A big part of the authorship of this patch goes to Robin Sheat.

Test plan:
1/ Add/Update/Delete local use prefs
2/ Update pref values and confirm that the changes are correctly taken
into account

Signed-off-by: Chris 

Signed-off-by: Josef Moravec 
Tested with plack with syspref cache enabled, there is some time between
setting the syspref and applying it, but it takes just one reload of page, it
shouldn't be problem, should it?

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 11998] Syspref caching issues

2016-03-03 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11998

--- Comment #100 from Chris Cormack  ---
Please note I have tested this under CGI, caching works fine, but it still
needs testing under plack.

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 11998] Syspref caching issues

2016-03-03 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11998

Chris Cormack  changed:

   What|Removed |Added

 Status|Needs Signoff   |Signed Off

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


  1   2   3   >