Bug 30511 - Don't lock entire database when dumping Koha instance
Summary: Don't lock entire database when dumping Koha instance
Status: Pushed to master
Alias: None
Product: Koha
Classification: Unclassified
Component: Command-line Utilities (show other bugs)
Version: master
Hardware: All All
: P5 - low enhancement (vote)
Assignee: Alex Buckley
QA Contact: Marcel de Rooy
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-04-12 02:20 UTC by Alex Buckley
Modified: 2022-05-17 12:38 UTC (History)
5 users (show)

See Also:
Change sponsored?: Sponsored
Patch complexity: Small patch
Text to go in the release notes:
Version(s) released in:
22.05.00


Attachments
Bug 30511: Don't lock up entire database while running koha-dump (1.46 KB, patch)
2022-04-12 02:22 UTC, Alex Buckley
Details | Diff | Splinter Review
Bug 30511: Don't lock up entire database while running koha-dump (1.51 KB, patch)
2022-04-12 07:05 UTC, David Cook
Details | Diff | Splinter Review
Bug 30511: Don't lock up entire database while running koha-dump (1.61 KB, patch)
2022-04-29 06:32 UTC, Marcel de Rooy
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Alex Buckley 2022-04-12 02:20:51 UTC
koha-dump should use the --single-transaction flag, like misc/cronjobs/backup.sh does. This is to avoid koha-dump locking up the whole database.

More information on the single-transaction flag can be found here: https://dev.mysql.com/doc/refman/5.7/en/mysqldump.html#option_mysqldump_single-transaction
Comment 1 Alex Buckley 2022-04-12 02:22:23 UTC
Created attachment 133203 [details] [review]
Bug 30511: Don't lock up entire database while running koha-dump

Test plan:
1. Apply the patch
2. Restart services
3. Run koha-dump
4. Confirm the .sql.gz and .tar.gz files are generated successfully

Sponsored-by: Catalyst IT
Comment 2 David Cook 2022-04-12 07:05:49 UTC
Created attachment 133204 [details] [review]
Bug 30511: Don't lock up entire database while running koha-dump

Test plan:
1. Apply the patch
2. Restart services
3. Run koha-dump
4. Confirm the .sql.gz and .tar.gz files are generated successfully

Sponsored-by: Catalyst IT

Signed-off-by: David Cook <dcook@prosentient.com.au>
Comment 3 David Cook 2022-04-12 07:12:02 UTC
I've been using this in production for a while and it's been great.
Comment 4 Marcel de Rooy 2022-04-29 06:32:50 UTC
Created attachment 134347 [details] [review]
Bug 30511: Don't lock up entire database while running koha-dump

Test plan:
1. Apply the patch
2. Restart services
3. Run koha-dump
4. Confirm the .sql.gz and .tar.gz files are generated successfully

Sponsored-by: Catalyst IT

Signed-off-by: David Cook <dcook@prosentient.com.au>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Comment 5 Marcel de Rooy 2022-04-29 06:34:04 UTC
We could do so since we do no longer have a mix of InnoDB and MyISAM tables. This produces a coherent dump for InnoDB tables.
Comment 6 Fridolin Somers 2022-05-11 08:49:04 UTC
Pushed to master for 22.05, thanks to everybody involved 🦄