Bug 15958 - ZOOM/Zebra-connection cache flushing
Summary: ZOOM/Zebra-connection cache flushing
Status: Failed QA
Alias: None
Product: Koha
Classification: Unclassified
Component: Searching (show other bugs)
Version: master
Hardware: All All
: P5 - low enhancement (vote)
Assignee: Olli-Antti Kivilahti
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-03-02 16:31 UTC by Olli-Antti Kivilahti
Modified: 2017-10-15 09:38 UTC (History)
1 user (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:


Attachments
Bug 15958 - ZOOM/Zebra-connection cache flushing (1.26 KB, patch)
2016-03-02 16:32 UTC, Olli-Antti Kivilahti
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Olli-Antti Kivilahti 2016-03-02 16:31:50 UTC
When writing tests related to searching, When searching the local index repeatedly, changes in the index are not applied to the search results if the results always return the same records.
This is due to ZOOM caching the results.
This feature adds a ZOOM::Connection flushing subroutine to get rid of old caches.
Comment 1 Olli-Antti Kivilahti 2016-03-02 16:32:44 UTC
Created attachment 48549 [details] [review]
Bug 15958 - ZOOM/Zebra-connection cache flushing

When writing tests related to searching, When searching the local index
repeatedly, changes in the index are not applied to the search results if
the results always return the same records.

This is due to ZOOM caching the results.
This feature adds a ZOOM::Connection flushing subroutine to get rid of old
caches.
Comment 2 Mark Tompsett 2016-04-06 12:50:47 UTC
Comment on attachment 48549 [details] [review]
Bug 15958 - ZOOM/Zebra-connection cache flushing

Review of attachment 48549 [details] [review]:
-----------------------------------------------------------------

::: C4/Context.pm
@@ +788,5 @@
> +
> +=cut
> +
> +sub flushZconns {
> +	my @ZconnKeys = keys%{$context->{"Zconn"}} if ref($context->{"Zconn"}) eq 'HASH';

Not sure how to trigger, but if $context->{"Zconn"} is undefined or not a HASH, then @ZconnKeys doesn't get defined, which will break the loop. Split declarations from conditional initializations.
Comment 3 Katrin Fischer 2017-10-15 09:38:05 UTC
Patch still applies, setting to Failed QA based on Mark's last comment. Can you please take a look?