Summary: | update_totalissues.pl uses $dbh->commit but does not use transactions | ||
---|---|---|---|
Product: | Koha | Reporter: | Nick Clemens (kidclamp) <nick> |
Component: | Command-line Utilities | Assignee: | Nick Clemens (kidclamp) <nick> |
Status: | Pushed to oldstable --- | QA Contact: | Martin Renvoize (ashimema) <martin.renvoize> |
Severity: | major | ||
Priority: | P5 - low | CC: | fridolin.somers, lucas, martin.renvoize, robin, wainuiwitikapark |
Version: | Main | ||
Hardware: | All | ||
OS: | All | ||
Change sponsored?: | --- | Patch complexity: | --- |
Documentation contact: | Documentation submission: | ||
Text to go in the release notes: | Version(s) released in: |
24.11.00,24.05.04,23.11.10
|
|
Circulation function: | |||
Bug Depends on: | 36474 | ||
Bug Blocks: | |||
Attachments: |
Bug 37775: Remove delayed commits from update_totalissues.pl and add progress option
Bug 37775: Spelling and tidy Bug 37775: Remove delayed commits from update_totalissues.pl and add progress option Bug 37775: Spelling and tidy Bug 37775: Remove delayed commits from update_totalissues.pl and add progress option Bug 37775: Spelling and tidy |
Description
Nick Clemens (kidclamp)
2024-08-29 12:41:17 UTC
Created attachment 170908 [details] [review] Bug 37775: Remove delayed commits from update_totalissues.pl and add progress option This patch removes setting AutoCommit to 0 and commiting only every X records. Instead we commit as we go and report progress using a parameter. Bug 36474 reduced the numebr of changes that are being committed, so this should be a reasonable change. The use of commits without transactions was causing problems if the library was active while the script ran. To test: 1 - perl misc/cronjobs/update_totalissues.pl -c 2 - Script runs, but with unknown parameter 3 - perl misc/cronjobs/update_totalissues.pl -p 10 4 - Script runs and reports every 10 records 5 - per; misc/cronjobs/update_totalissues.pl 6 - Script runs and reports every 100 records by default Created attachment 170909 [details] [review] Bug 37775: Spelling and tidy Created attachment 171490 [details] [review] Bug 37775: Remove delayed commits from update_totalissues.pl and add progress option This patch removes setting AutoCommit to 0 and commiting only every X records. Instead we commit as we go and report progress using a parameter. Bug 36474 reduced the numebr of changes that are being committed, so this should be a reasonable change. The use of commits without transactions was causing problems if the library was active while the script ran. To test: 1 - perl misc/cronjobs/update_totalissues.pl -c 2 - Script runs, but with unknown parameter 3 - perl misc/cronjobs/update_totalissues.pl -p 10 4 - Script runs and reports every 10 records 5 - per; misc/cronjobs/update_totalissues.pl 6 - Script runs and reports every 100 records by default Signed-off-by: Brendan Lawlor <blawlor@clamsnet.org> Created attachment 171491 [details] [review] Bug 37775: Spelling and tidy Signed-off-by: Brendan Lawlor <blawlor@clamsnet.org> Created attachment 171648 [details] [review] Bug 37775: Remove delayed commits from update_totalissues.pl and add progress option This patch removes setting AutoCommit to 0 and commiting only every X records. Instead we commit as we go and report progress using a parameter. Bug 36474 reduced the numebr of changes that are being committed, so this should be a reasonable change. The use of commits without transactions was causing problems if the library was active while the script ran. To test: 1 - perl misc/cronjobs/update_totalissues.pl -c 2 - Script runs, but with unknown parameter 3 - perl misc/cronjobs/update_totalissues.pl -p 10 4 - Script runs and reports every 10 records 5 - per; misc/cronjobs/update_totalissues.pl 6 - Script runs and reports every 100 records by default Signed-off-by: Brendan Lawlor <blawlor@clamsnet.org> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Created attachment 171649 [details] [review] Bug 37775: Spelling and tidy Signed-off-by: Brendan Lawlor <blawlor@clamsnet.org> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Thanks for all the hard work! Pushed to main for the next 24.11.00 release as RM Assistant Backported to 24.05.x for upcoming 24.05.04 Pushed to 23.11.x for 23.11.10 Not backporting to 23.05.x unless requested |