[Bug 16070] New: Empty (undef) system preferences may cause some issues in combination with memcache
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16070 Bug ID: 16070 Summary: Empty (undef) system preferences may cause some issues in combination with memcache Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: enhancement Priority: P5 - low Component: Architecture, internals, and plumbing Assignee: gmcharlt@gmail.com Reporter: abl@biblos.pk.edu.pl QA Contact: testopia@bugs.koha-community.org See Bug 11998 comment #113 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16070 Jacek Ablewicz <abl@biblos.pk.edu.pl> changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on| |11998 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11998 [Bug 11998] Syspref caching issues -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16070 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jonathan.druart@bugs.koha-c | |ommunity.org --- Comment #1 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- bug 11998 comment 113: """ 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.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16070 --- Comment #2 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- In the case of sysprefs, it does not make sense to have them with an undefined value. They should be updated. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16070 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16070 --- Comment #3 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 49164 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=49164&action=edit Bug 16070: Default value for sysprefs should be an empty string The default value for sysprefs should not be NULL but an empty string. When a pref is cleared, it's set to an empty string, so it does not make sense to create it with an undefined value. The main purpose of this patch is to remove the warning in logs when a pref is accessed for the first time and the cache is not yet populated. It also ensures that the behavior will be the same for the first access and the others. Test plan: SELECT COUNT(*) FROM systempreferences WHERE value IS NULL; Should not return any results after the update DB entry executed. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16070 Srdjan Jankovic <srdjan@catalyst.net.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16070 Srdjan Jankovic <srdjan@catalyst.net.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #49164|0 |1 is obsolete| | --- Comment #4 from Srdjan Jankovic <srdjan@catalyst.net.nz> --- Created attachment 49196 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=49196&action=edit [SIGNED-OFF] Bug 16070: Default value for sysprefs should be an empty string The default value for sysprefs should not be NULL but an empty string. When a pref is cleared, it's set to an empty string, so it does not make sense to create it with an undefined value. The main purpose of this patch is to remove the warning in logs when a pref is accessed for the first time and the cache is not yet populated. It also ensures that the behavior will be the same for the first access and the others. Test plan: SELECT COUNT(*) FROM systempreferences WHERE value IS NULL; Should not return any results after the update DB entry executed. Signed-off-by: Srdjan <srdjan@catalyst.net.nz> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16070 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|gmcharlt@gmail.com |jonathan.druart@bugs.koha-c | |ommunity.org -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16070 --- Comment #5 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 49254 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=49254&action=edit Bug 16070: Add atomic update file -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16070 --- Comment #6 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- I forgot the atomic update file! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16070 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #49196|0 |1 is obsolete| | --- Comment #7 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 49550 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=49550&action=edit Bug 16070: Default value for sysprefs should be an empty string The default value for sysprefs should not be NULL but an empty string. When a pref is cleared, it's set to an empty string, so it does not make sense to create it with an undefined value. The main purpose of this patch is to remove the warning in logs when a pref is accessed for the first time and the cache is not yet populated. It also ensures that the behavior will be the same for the first access and the others. Test plan: SELECT COUNT(*) FROM systempreferences WHERE value IS NULL; Should not return any results after the update DB entry executed. Signed-off-by: Srdjan <srdjan@catalyst.net.nz> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16070 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #49254|0 |1 is obsolete| | --- Comment #8 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 49551 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=49551&action=edit Bug 16070: Add atomic update file Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16070 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA Patch complexity|--- |Trivial patch CC| |tomascohen@gmail.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16070 Brendan Gallagher <brendan@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |brendan@bywatersolutions.co | |m Status|Passed QA |Pushed to Master --- Comment #9 from Brendan Gallagher <brendan@bywatersolutions.com> --- Pushed to Master - Should be in the May 2016 release. Thanks! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16070 Mason James <mtj@kohaaloha.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to Master |Pushed to Stable CC| |mtj@kohaaloha.com --- Comment #10 from Mason James <mtj@kohaaloha.com> --- Added to Koha 16.05.00 release -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org