[Bug 37349] New: Use cache for authority types when linking bibs to authorities
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37349 Bug ID: 37349 Summary: Use cache for authority types when linking bibs to authorities Change sponsored?: --- Product: Koha Version: Main Hardware: All OS: All Status: NEW Severity: normal Priority: P5 - low Component: MARC Authority data support Assignee: koha-bugs@lists.koha-community.org Reporter: nick@bywatersolutions.com QA Contact: testopia@bugs.koha-community.org LinkBibHeadingstoAuthorities fetches the authority type for the heading for each heading, sometimes more than once, we can improve this -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37349 Nick Clemens (kidclamp) <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37349 --- Comment #1 from Nick Clemens (kidclamp) <nick@bywatersolutions.com> --- Created attachment 168922 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=168922&action=edit Bug 37349: Use cache for authority types and remove extra fetch This patch caches the authority types when fetched during linking to avoid grabbing the same type more than once. Additionally it removes a second call to fetch the same type in some scenarios To test: 1 - Apply patch 2 - Enable linking during cataloging/updating records 3 - Edit a record and confirm it is linked ocrrectly 4 - Run the authority linking cron and confirm it works as expected -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37349 Nick Clemens (kidclamp) <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|koha-bugs@lists.koha-commun |nick@bywatersolutions.com |ity.org | -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37349 Nick Clemens (kidclamp) <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #168922|0 |1 is obsolete| | --- Comment #2 from Nick Clemens (kidclamp) <nick@bywatersolutions.com> --- Created attachment 170142 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=170142&action=edit Bug 37349: Use cache for authority types and remove extra fetch This patch caches the authority types when fetched during linking to avoid grabbing the same type more than once. Additionally it removes a second call to fetch the same type in some scenarios To test: 1 - Apply patch 2 - Enable linking during cataloging/updating records 3 - Edit a record and confirm it is linked ocrrectly 4 - Run the authority linking cron and confirm it works as expected -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37349 Nick Clemens (kidclamp) <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |katrin.fischer@bsz-bw.de, | |phil@chetcolibrary.org -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37349 --- Comment #3 from Phil Ringnalda <phil@chetcolibrary.org> --- Even though I've never had the need to modify an authority type's auth_tag_to_report, shouldn't doing so invalidate the cache? Or at least have a warning in admin/authtypes.pl?op=add_form that restarting Koha is required for it to take effect? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37349 --- Comment #4 from Nick Clemens (kidclamp) <nick@bywatersolutions.com> --- The code here is using the L1 cache, this is cleared for every request i.e. if you change a type it will be picked up in the next code call - this just ensures it is cached during a single process run -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37349 Phil Ringnalda <phil@chetcolibrary.org> 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=37349 Phil Ringnalda <phil@chetcolibrary.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #170142|0 |1 is obsolete| | --- Comment #5 from Phil Ringnalda <phil@chetcolibrary.org> --- Created attachment 170211 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=170211&action=edit Bug 37349: Use cache for authority types and remove extra fetch This patch caches the authority types when fetched during linking to avoid grabbing the same type more than once. Additionally it removes a second call to fetch the same type in some scenarios To test: 1 - Apply patch 2 - Enable linking during cataloging/updating records 3 - Edit a record and confirm it is linked ocrrectly 4 - Run the authority linking cron and confirm it works as expected Signed-off-by: Phil Ringnalda <phil@chetcolibrary.org> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37349 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA Patch complexity|--- |Small patch -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37349 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #170211|0 |1 is obsolete| | --- Comment #6 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Created attachment 170436 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=170436&action=edit Bug 37349: Use cache for authority types and remove extra fetch This patch caches the authority types when fetched during linking to avoid grabbing the same type more than once. Additionally it removes a second call to fetch the same type in some scenarios To test: 1 - Apply patch 2 - Enable linking during cataloging/updating records 3 - Edit a record and confirm it is linked ocrrectly 4 - Run the authority linking cron and confirm it works as expected Signed-off-by: Phil Ringnalda <phil@chetcolibrary.org> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37349 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |m.de.rooy@rijksmuseum.nl QA Contact|testopia@bugs.koha-communit |m.de.rooy@rijksmuseum.nl |y.org | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37349 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Severity|normal |enhancement --- Comment #7 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- (In reply to Nick Clemens (kidclamp) from comment #0)
LinkBibHeadingstoAuthorities fetches the authority type for the heading for each heading, sometimes more than once, we can improve this
Moving to enh -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37349 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |additional_work_needed --- Comment #8 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Should we have a unit test for this change to C4/Biblio.pm? t/db_dependent/Biblio.t passes. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37349 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to main Version(s)| |24.11.00 released in| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37349 --- Comment #9 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Pushed for 24.11! Well done everyone, thank you! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37349 Martin Renvoize (ashimema) <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |release-notes-needed -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37349 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Summary|Use cache for authority |Use cache for authority |types when linking bibs to |types when linking |authorities |bibliographic records to | |authorities --- Comment #10 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Still waiting for reply on unit test (comment#8) -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37349 Lucas Gass (lukeg) <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to main |Needs documenting CC| |lucas@bywatersolutions.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37349 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords|additional_work_needed | --- Comment #11 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- (In reply to Katrin Fischer from comment #10)
Still waiting for reply on unit test (comment#8)
Giving up on the test for now. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37349 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords|release-notes-needed | --- Comment #12 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Skipping for release notes as it would be quite technical: This patch caches the authority types when fetched during linking to avoid grabbing the same type more than once. Additionally it removes a second call to fetch the same type in some scenarios -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37349 --- Comment #13 from Nick Clemens (kidclamp) <nick@bywatersolutions.com> --- Created attachment 174940 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=174940&action=edit Bug 37349: Unit tests This patch adds tests to verify the cahcing of authority type in LinkBibHeadingsToAuthority and adjusts other tests to clear the cache when changing marc flavour -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37349 --- Comment #14 from Nick Clemens (kidclamp) <nick@bywatersolutions.com> --- Created attachment 174941 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=174941&action=edit Bug 37349: (follow-up) Cache the authority type, not just the key Test were failing because I neglected to store the value in the cache, I was only adding the cache key -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37349 Nick Clemens (kidclamp) <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |additional_work_needed -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37349 --- Comment #15 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Picked last 2 patches for main. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37349 Wainui Witika-Park <wainuiwitikapark@catalyst.net.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |wainuiwitikapark@catalyst.n | |et.nz --- Comment #16 from Wainui Witika-Park <wainuiwitikapark@catalyst.net.nz> --- (In reply to Katrin Fischer from comment #15)
Picked last 2 patches for main.
Should I do the same for 24.05? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37349 --- Comment #17 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- (In reply to Wainui Witika-Park from comment #16)
(In reply to Katrin Fischer from comment #15)
Picked last 2 patches for main.
Should I do the same for 24.05?
Hi Wainui, I think this patch set is not in 24.05. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37349 --- Comment #18 from Wainui Witika-Park <wainuiwitikapark@catalyst.net.nz> --- (In reply to Katrin Fischer from comment #17)
(In reply to Wainui Witika-Park from comment #16)
(In reply to Katrin Fischer from comment #15)
Picked last 2 patches for main.
Should I do the same for 24.05?
Hi Wainui, I think this patch set is not in 24.05.
Ok thanks Katrin! Not backporting to 24.05 unless requested -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37349 Nick Clemens (kidclamp) <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords|additional_work_needed | -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org