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

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Mon Oct 4 12:55:56 CEST 2021


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

Peter Vashchuk <stalkernoid at gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
 Attachment #122782|0                           |1
        is obsolete|                            |

--- Comment #9 from Peter Vashchuk <stalkernoid at gmail.com> ---
Created attachment 125692
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=125692&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 changes logaction subroutine to perform a special transformation,
if$info came as known object, that 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.


More information about the Koha-bugs mailing list