[Koha-bugs] [Bug 28692] Reduce DB action_log table size

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Thu Jul 8 16:55:17 CEST 2021


https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28692

--- Comment #1 from Peter Vashchuk <stalkernoid at gmail.com> ---
Created attachment 122683
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=122683&action=edit
Bug 28692 - log without indentation to decrease DB action_log table size

Indentation symbols like spaces and newlines take up a large amount of 
extra space. Example: fully indented action_log item MODIFY record 
weighs from 1.6 to 370 KB while the version of it without any 
indentation takes 1.1 to 46 KB accordingly.

This patch adds Indent(0) parameter of Data::Dumper to output without 
indentation.

To reproduce for item:
1) edit any item you see fit, save it.
2) check the action_logs table and find there a newly created MODIFY 
item row, "info" column of that contains dumped data, see that it has 
indentation, optional: check and note about the size of it.
3) apply the patch.
4) edit that item again and save it afterwards.
5) "info" column of the newly created row should contain non-indented 
text now. If you did check the size of the previous dump, compare it 
with this new one, check the difference it makes.

To reproduce for hold:
1) in syspref set HoldsLog to Log.
1) go to the biblio page and suspend and resume any hold you see fit.
2) check the action_logs table and find there a newly created SUSPEND 
item row, "info" column of that contains dumped data, see that it has 
indentation, optional: check and note about the size of it.
3) apply the patch.
4) edit that item again and save it afterwards.
5) "info" column of the newly created row should contain non-indented 
text now. If you did check the size of the previous dump, compare it 
with this new one, check the difference it makes.

-- 
You are receiving this mail because:
You are watching all bug changes.
You are the assignee for the bug.


More information about the Koha-bugs mailing list