[Bug 16104] New: Warnings "used only once: possible typo" should be removed
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16104 Bug ID: 16104 Summary: Warnings "used only once: possible typo" should be removed Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: ASSIGNED Severity: normal Priority: P5 - low Component: Architecture, internals, and plumbing Assignee: jonathan.druart@bugs.koha-community.org Reporter: jonathan.druart@bugs.koha-community.org QA Contact: testopia@bugs.koha-community.org Since bug 11998, the following warnings are raised: Name "Tie::Hash::FIELDS" used only once: possible typo at /usr/share/perl/5.22/fields.pm line 135. Name "Cache::RemovalStrategy::LRU::FIELDS" used only once: possible typo at /usr/share/perl/5.22/fields.pm line 135. Name "Cache::RemovalStrategy::FIELDS" used only once: possible typo at /usr/share/perl/5.22/fields.pm line 135. It comes from the Koha::Cache 103 if ( can_load( modules => { 'Cache::Memory' => undef } ) ) { -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16104 Jonathan Druart <jonathan.druart@bugs.koha-community.org> 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=16104 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16104 --- Comment #1 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 49314 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=49314&action=edit Bug 16104: Remove warnings "used only once: possible typo" Since bug 11998, the following warnings are raised: Name "Tie::Hash::FIELDS" used only once: possible typo at /usr/share/perl/5.22/fields.pm line 135. Name "Cache::RemovalStrategy::LRU::FIELDS" used only once: possible typo at /usr/share/perl/5.22/fields.pm line 135. Name "Cache::RemovalStrategy::FIELDS" used only once: possible typo at /usr/share/perl/5.22/fields.pm line 135. It comes from the Koha::Cache 103 if ( can_load( modules => { 'Cache::Memory' => undef } ) ) { Test plan: perl -wc C4/AuthoritiesMarc.pm should return green QA note: this may have an impact on performance but I have not found any other workarounds. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16104 Jonathan Druart <jonathan.druart@bugs.koha-community.org> 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.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16104 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://bugs.koha-community | |.org/bugzilla3/show_bug.cgi | |?id=16008 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16104 M. Tompsett <mtompset@hotmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |mtompset@hotmail.com --- Comment #2 from M. Tompsett <mtompset@hotmail.com> --- *** Bug 16101 has been marked as a duplicate of this bug. *** -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16104 M. Tompsett <mtompset@hotmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #49314|0 |1 is obsolete| | --- Comment #3 from M. Tompsett <mtompset@hotmail.com> --- Created attachment 49325 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=49325&action=edit Bug 16104: Remove warnings "used only once: possible typo" Since bug 11998, the following warnings are raised: Name "Tie::Hash::FIELDS" used only once: possible typo at /usr/share/perl/5.22/fields.pm line 135. Name "Cache::RemovalStrategy::LRU::FIELDS" used only once: possible typo at /usr/share/perl/5.22/fields.pm line 135. Name "Cache::RemovalStrategy::FIELDS" used only once: possible typo at /usr/share/perl/5.22/fields.pm line 135. It comes from the Koha::Cache 103 if ( can_load( modules => { 'Cache::Memory' => undef } ) ) { Test plan: perl -wc C4/AuthoritiesMarc.pm should return green QA note: this may have an impact on performance but I have not found any other workarounds. NOTE: I applied 15870 to master, got the error (-v 2 -c 5), applied 16104, rebased it in front, error disappeared (still only -c 5), rebased it at the end, and signed off 16104. Signed-off-by: Mark Tompsett <mtompset@hotmail.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16104 M. Tompsett <mtompset@hotmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off --- Comment #4 from M. Tompsett <mtompset@hotmail.com> --- Also did an: 1) apply patch 2) perl -cw C4/AuthoritiesMarc.pm -- no issues 3) checked out master 4) repeat step 2 -- expected failures. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16104 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Patch complexity|--- |Trivial patch Status|Signed Off |Passed QA -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16104 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #49325|0 |1 is obsolete| | --- Comment #5 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Created attachment 49827 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=49827&action=edit [PASSED QA] Bug 16104: Remove warnings "used only once: possible typo" Since bug 11998, the following warnings are raised: Name "Tie::Hash::FIELDS" used only once: possible typo at /usr/share/perl/5.22/fields.pm line 135. Name "Cache::RemovalStrategy::LRU::FIELDS" used only once: possible typo at /usr/share/perl/5.22/fields.pm line 135. Name "Cache::RemovalStrategy::FIELDS" used only once: possible typo at /usr/share/perl/5.22/fields.pm line 135. It comes from the Koha::Cache 103 if ( can_load( modules => { 'Cache::Memory' => undef } ) ) { Test plan: perl -wc C4/AuthoritiesMarc.pm should return green QA note: this may have an impact on performance but I have not found any other workarounds. NOTE: I applied 15870 to master, got the error (-v 2 -c 5), applied 16104, rebased it in front, error disappeared (still only -c 5), rebased it at the end, and signed off 16104. Signed-off-by: Mark Tompsett <mtompset@hotmail.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16104 Marc Véron <veron@veron.ch> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |13287 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13287 [Bug 13287] Add a system preference to define the number of days used in purge_suggestions.pl -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16104 Brendan Gallagher <brendan@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to Master CC| |brendan@bywatersolutions.co | |m --- Comment #6 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=16104 Julian Maurice <julian.maurice@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |julian.maurice@biblibre.com Status|Pushed to Master |Pushed to Stable --- Comment #7 from Julian Maurice <julian.maurice@biblibre.com> --- Patch pushed to 3.22.x, will be in 3.22.6 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16104 Jacek Ablewicz <abl@biblos.pk.edu.pl> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |abl@biblos.pk.edu.pl --- Comment #8 from Jacek Ablewicz <abl@biblos.pk.edu.pl> --- (In reply to Jonathan Druart from comment #1)
QA note: this may have an impact on performance but I have not found any other workarounds.
This if ( can_load( modules => { 'Cache::Memory' => undef, nocache => 1 } ) ) { is not a right syntax for 'noncache' parameter.. If called that way, can_load() tries to load Cache::Memory and (nonexisting) 'nocache' module (version >= 1.0), and fails - so it simply prevents Cache::Memory loading (hence no more warnings). This has and enormous impact on performance in all setups which do not use memcached as a caching system; after that, memchached is the only caching system still working in Koha. It also causes 'prove t/Cache.t' to fail in the default setup (w/o memcached). -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16104 --- Comment #9 from Jacek Ablewicz <abl@biblos.pk.edu.pl> --- I found another workaround: +can_load( modules => { 'Cache::Memory' => undef } ) && Cache::Memory->new(); our %L1_cache; - if ( can_load( modules => { 'Cache::Memory' => undef, nocache => 1 } ) ) { + if ( can_load( modules => { 'Cache::Memory' => undef } ) ) { which seems to work (?, "perl -wc C4/AuthoritiesMarc.pm" does not emit any warnings) without introducing noticeable performance issues, but I have no idea how exactly/why it works.. I have a feeling that it only hides the problem (whatever it really is) instead of fixing it properly. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16104 --- Comment #10 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- (In reply to Jacek Ablewicz from comment #8)
This
if ( can_load( modules => { 'Cache::Memory' => undef, nocache => 1 } ) ) {
is not a right syntax for 'noncache' parameter.. If called that way, can_load() tries to load Cache::Memory and (nonexisting) 'nocache' module (version >= 1.0), and fails - so it simply prevents Cache::Memory loading (hence no more warnings). This has and enormous impact on performance in all setups which do not use memcached as a caching system; after that, memchached is the only caching system still working in Koha.
Erk! You are right, I misread the doc :-/ @RM please revert this patch -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16104 --- Comment #11 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- (In reply to Jonathan Druart from comment #10)
@RM please revert this patch
ping! Above all, it fails 2 tests in t/db_dependent/Context.t -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16104 --- Comment #12 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- (In reply to Jonathan Druart from comment #11)
(In reply to Jonathan Druart from comment #10)
@RM please revert this patch
ping!
Above all, it fails 2 tests in t/db_dependent/Context.t
And t/db_dependent/sysprefs.t -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16104 --- Comment #13 from Julian Maurice <julian.maurice@biblibre.com> --- Patch reverted in 3.22.x -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16104 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |m.de.rooy@rijksmuseum.nl See Also| |https://bugs.koha-community | |.org/bugzilla3/show_bug.cgi | |?id=16406 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16104 --- Comment #14 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 51087 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=51087&action=edit Revert "Bug 16104: Remove warnings "used only once: possible typo"" This reverts commit 6b319a2d487257e8a08bc26af9c6b2e7fa2ece2c. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16104 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to Stable |ASSIGNED -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16104 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16104 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> 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=16104 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16104 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #49827|0 |1 is obsolete| | Attachment #51087|0 |1 is obsolete| | --- Comment #15 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Created attachment 51088 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=51088&action=edit Revert "Bug 16104: Remove warnings "used only once: possible typo"" This reverts commit 6b319a2d487257e8a08bc26af9c6b2e7fa2ece2c. Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Tested with memcached and without MEMCACHED_SERVERS. Cache.t, Context.t and sysprefs.t pass now. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16104 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to Master CC| |kyle@bywatersolutions.com --- Comment #16 from Kyle M Hall <kyle@bywatersolutions.com> --- Revert pushed to master -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16104 Julian Maurice <julian.maurice@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to Master |Pushed to Stable --- Comment #17 from Julian Maurice <julian.maurice@biblibre.com> --- Revert will be in 3.22.7 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16104 --- Comment #18 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- If you compile (perl -cw) a script or module now that contains a use C4::Context, you have the following warnings: Name "Tie::Hash::FIELDS" used only once: possible typo at /usr/share/perl/5.22/fields.pm line 135. Name "Cache::RemovalStrategy::LRU::FIELDS" used only once: possible typo at /usr/share/perl/5.22/fields.pm line 135. Name "Cache::RemovalStrategy::FIELDS" used only once: possible typo at /usr/share/perl/5.22/fields.pm line 135. [ PS koha-qa does the same. ] Are these warnings somehow related to perl's Cache module containing things like below? use base qw(Tie::Hash); my $strategy = $args->{removal_strategy} || 'Cache::RemovalStrategy::LRU'; -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16104 --- Comment #19 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- (In reply to Marcel de Rooy from comment #18)
If you compile (perl -cw) a script or module now that contains a use C4::Context, you have the following warnings:
Name "Tie::Hash::FIELDS" used only once: possible typo at /usr/share/perl/5.22/fields.pm line 135. Name "Cache::RemovalStrategy::LRU::FIELDS" used only once: possible typo at /usr/share/perl/5.22/fields.pm line 135. Name "Cache::RemovalStrategy::FIELDS" used only once: possible typo at /usr/share/perl/5.22/fields.pm line 135.
[ PS koha-qa does the same. ]
Are these warnings somehow related to perl's Cache module containing things like below?
use base qw(Tie::Hash);
my $strategy = $args->{removal_strategy} || 'Cache::RemovalStrategy::LRU';
Yes, more or less, but I have never managed to track down completely the problem. There is something weird happening... To recreate easily, see bug 11998 comment 62 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16104 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |katrin.fischer@bsz-bw.de Status|Pushed to Stable |In Discussion See Also| |https://bugs.koha-community | |.org/bugzilla3/show_bug.cgi | |?id=12063 --- Comment #20 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Hm, this has been reverted - changing status. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16104 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|In Discussion |ASSIGNED -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16104 --- Comment #21 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- FYI I have added a temporary fix to the qa tools commit d73431289d4c72d7751b006137f518851d2ee605 Do not consider "used only once: possible typo" as a warning (and make the tests pass!) -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16104 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|jonathan.druart@bugs.koha-c |gmcharlt@gmail.com |ommunity.org | Status|ASSIGNED |NEW -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16104 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |rbit@rbit.cz --- Comment #22 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- *** Bug 17238 has been marked as a duplicate of this bug. *** -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16104 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks|13287 | Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13287 [Bug 13287] Add a system preference to define the number of days used in purge_suggestions.pl -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16104 --- Comment #23 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- History here is a little confusing and I am not sure how to test if these warning still occur. Is this still valid? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16104 Jonathan Druart <jonathan.druart@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution|--- |DUPLICATE --- Comment #24 from Jonathan Druart <jonathan.druart@gmail.com> --- The warnings are gone. Certainly fixed by Bug 21955: Remove Cache::Memory as fallback for L2 cache *** This bug has been marked as a duplicate of bug 21955 *** -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org