It is possibile in Koha to 'override' system preference values stored in the database, by setting environment variables (export OVERRIDE_SYSPREF_... = ... in shell, web server config file etc.). After Bug 11998, this feature may work unreliably when used in combination with shared/permanent caching systems (memcache, fastmmap) implemented in Koha::Cache currently. - if the system preference is already stored in shared cache in the moment when (some) other script will try to override it, such override will seemingly have no effect for that script - if the preference is not (yet) in the shared cache, and some script overrides it "for it's own purpose", this override will get propagated to the shared cache, and may unintentionally affect other scripts from now on
Created attachment 49160 [details] [review] [master]Bug 16068: Do not cache overridden prefs These prefs do not need to be cache, a quick access to $ENV permit to get the value.
Created attachment 49161 [details] [review] [on top of bug 16044]Bug 16068: Do not cache overridden prefs These prefs do not need to be cache, a quick access to $ENV permit to get the value.
Created attachment 49162 [details] [review] [on top of bug 16044]Bug 16068: Do not cache overridden prefs These prefs do not need to be cache, a quick access to $ENV permit to get the value.
Created attachment 49166 [details] [review] Bug 16068: Do not cache overridden prefs These prefs do not need to be cached, a quick access to $ENV permit to get the value. Signed-off-by: Jacek Ablewicz <abl@biblos.pk.edu.pl>
Created attachment 49167 [details] [review] [master]Bug 16068: Do not cache overridden prefs These prefs do not need to be cached, a quick access to $ENV permit to get the value. Signed-off-by: Jacek Ablewicz <abl@biblos.pk.edu.pl>
Created attachment 49168 [details] [review] [on top of bug 16044]Bug 16068: Do not cache overridden prefs These prefs do not need to be cached, a quick access to $ENV permit to get the value. Signed-off-by: Jacek Ablewicz <abl@biblos.pk.edu.pl>
Raising the severity as we absolutely want to into the next release.
16044 is pushed to master now.. presume we only need the one patch.. (in fact they look the same to me on cursory glance) Obsoleting the 'on top of bug 16044' version and qa'ing the other.
On second thoughts, it looks like it needs rebasing.. I've un-obsoleted the one I obsoleted. Applying the 'master' one results in a qa script error: FAIL valid Global symbol "%syspref_L1_cache" requires explicit package name Compilation failed in require BEGIN failed--compilation aborted As I'm not totally up to speed on this, I'm going to leave re-basing to someone else.. even though it looks trivial.
Created attachment 49808 [details] [review] Bug 16068: Do not cache overridden prefs These prefs do not need to be cached, a quick access to $ENV permit to get the value. Signed-off-by: Jacek Ablewicz <abl@biblos.pk.edu.pl>
Created attachment 49813 [details] [review] Bug 16068: Do not cache overridden prefs These prefs do not need to be cached, a quick access to $ENV permit to get the value. Signed-off-by: Jacek Ablewicz <abl@biblos.pk.edu.pl> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Sorted, works as advertised passing all my testing with flying colours. Good catch!
Pushed to Master - Should be in the May 2016 release. Thanks!
Patch pushed to 3.22.x, will be in 3.22.6