Bugzilla – Attachment 38060 Details for
Bug 13606
Batch modification for records is limited to ~500
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
[PASSED QA] Bug 13606 Clear job data in session when the job is completed
PASSED-QA-Bug-13606-Clear-job-data-in-session-when.patch (text/plain), 2.89 KB, created by
Kyle M Hall (khall)
on 2015-04-17 13:27:41 UTC
(
hide
)
Description:
[PASSED QA] Bug 13606 Clear job data in session when the job is completed
Filename:
MIME Type:
Creator:
Kyle M Hall (khall)
Created:
2015-04-17 13:27:41 UTC
Size:
2.89 KB
patch
obsolete
>From 087efd6519e86608b740b27c457c1952d92f075b Mon Sep 17 00:00:00 2001 >From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20Demians?= <f.demians@tamil.fr> >Date: Fri, 10 Apr 2015 08:44:39 +0200 >Subject: [PATCH] [PASSED QA] Bug 13606 Clear job data in session when the job is completed > >Bug 11395 uses the session to store the report sent to the interface >(update on biblio XX OK, etc.). > >If the session is stored in mysql, the max size of the >sessions.a_session will be reached easily (TEXT field). > >To reproduce: >0/ Set SessionStorage to 'mysql' >1/ Create a file with 500 biblionumbers: > mysql -e "select biblionumber from biblio limit 500;" | tail -n 500 > /tmp/biblionumbers.txt >2/ Define a marc modification template (something like "delete field 99$9" is nice) >3/ Load the /tmp/biblionumbers.txt in the batch biblio modification tool >4/ Repeat 3 >You will get: > Syck parser (line 1534, column 6): syntax error at > /usr/lib/i386-linux-gnu/perl5/5.20/YAML/Syck.pm line 75. >None Koha page is reachable. > >It comes from get_template_and_user > checkauth > get_session > >l.1595 $session = new CGI::Session("driver:MySQL;serializer:yaml;id:md5", $sessionID, {Handle=>$dbh}); > >5/ Get your sessionID contained in your CGISESSID cookie >Have a look at the value a_session in the sessions table: >mysql> select a_session from sessions where id="YOUR_SESSIONID"; > >You should see that the yaml is not correctly ended. >The size of the DB field has been reached and the yaml is truncated. > >Test plan: >0/ Delete your CGISESSID cookie >1/ Try to reproduce the previous issue >2/ After the second batch, have a look at the sessions table and confirm >that only one job_$JOB_ID exist in the yaml > >Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com> > >NOTE: Nicely clears batch job session information. > (2) is incorrect. This cleans up after a full run. > >Signed-off-by: Mark Tompsett <mtompset@hotmail.com> > >Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> >--- > C4/BackgroundJob.pm | 19 +++++++++++++++++++ > tools/batch_record_modification.pl | 1 + > 2 files changed, 20 insertions(+), 0 deletions(-) > >diff --git a/C4/BackgroundJob.pm b/C4/BackgroundJob.pm >index 3ab5125..c0a8dc4 100644 >--- a/C4/BackgroundJob.pm >+++ b/C4/BackgroundJob.pm >@@ -300,6 +300,25 @@ sub get { > return $self->{extra_values}->{$key}; > } > >+ >+=head2 clear >+ >+=over 4 >+ >+=item $job->clear(); >+ >+=back >+ >+Clear the job from the current session. >+ >+=cut >+ >+sub clear { >+ my $self = shift; >+ get_session($self->{sessionID})->clear('job_' . $self->{jobID}); >+} >+ >+ > 1; > __END__ > >diff --git a/tools/batch_record_modification.pl b/tools/batch_record_modification.pl >index beb2b4c..f275088 100755 >--- a/tools/batch_record_modification.pl >+++ b/tools/batch_record_modification.pl >@@ -62,6 +62,7 @@ if ( $completedJobID ) { > view => 'report', > ); > output_html_with_http_headers $input, $cookie, $template->output; >+ $job->clear(); > exit; > } > >-- >1.7.2.5
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 13606
:
35444
|
35445
|
37597
|
37601
|
37621
|
37627
|
37633
|
37634
|
37635
|
37636
|
37637
|
37648
|
37658
|
37660
|
37662
|
37663
|
37664
|
38058
|
38059
| 38060 |
38061
|
38431