Log Noise - OpenILS/Application/Search/Biblio.pm - == 'ARRAY'
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Evergreen |
New
|
Undecided
|
Unassigned |
Bug Description
EG 3.3.4
I'm seeing the following in our logs.
2019-10-20 20:40:28 virt-egapp2 open-ils.search: [WARN:9253:
The code around 142 look like
138 sub record_
139 my( $self, $client, $id ) = @_;
140 return undef unless defined $id;
141
142 if(ref($id) and ref($id) == 'ARRAY') {
143 return _records_to_mods( @$id );
144 }
145 my $mods_list = _records_to_mods( $id );
146 my $mods_obj = $mods_list->[0];
147 return OpenILS:
148 return $mods_obj;
149 }
Maybe that should be ref($id) eq 'ARRAY') since ref returns a string and 'ARRAY' is a string?
Josh
Changed in evergreen: | |
milestone: | none → 3.6.1 |
tags: | added: cleanup |
Changed in evergreen: | |
milestone: | 3.6.1 → 3.6.2 |
Changed in evergreen: | |
milestone: | 3.6.2 → 3.6.3 |
Changed in evergreen: | |
milestone: | 3.6.3 → 3.6.4 |
Hello, here is a branch with this fix. lp1848975_ mods_slim_ array_warning /git.evergreen- ils.org/ ?p=working/ Evergreen. git;a=shortlog; h=refs/ heads/user/ stompro/ lp1848975_ mods_slim_ array_warning
user/stompro/
https:/
I found that the main use of open-ils. search. biblio. record. mods_slim. retrieve with an array of record ID's in our system is the Mobius Carousel add on - https:/ /github. com/mcoia/ mobius_ evergreen/ blob/master/ bookbag_ update/ var/web/ opac/skin/ default/ js/carousel/ bbag_flesh. js
It doesn't look like there are many other normal calls to that service with an array of bib ids in the evergreen codebase. So this may not come up for many others.
Testing - It is easy to trigger this warning using the srfsh shell with a command like.
request open-ils.search open-ils. search. biblio. record. mods_slim. retrieve [102916]
Check the logs for the warning.
After applying the fix, the warning goes away.
Josh