Deadlock in flush_insert_instances #2

Open
opened 2023-12-02 10:23:41 +01:00 by hjp · 3 comments
Owner
err 2023-12-02T00:10:09.967605 DBD::mysql::db do failed: Deadlock found when trying to get lock; try restarting transaction at /usr/local/share/perl/5.36.0/Simba/CA.pm line 644, <GEN691> line 925332.

This happens sometimes (but not every time), when a new backup starts and the old one is still running.

I think this is caused by

2023-12-02T00:10:10+0100 3096535 [3]: added partition p1068 < 10680000000

in the new backup.

``` err 2023-12-02T00:10:09.967605 DBD::mysql::db do failed: Deadlock found when trying to get lock; try restarting transaction at /usr/local/share/perl/5.36.0/Simba/CA.pm line 644, <GEN691> line 925332. ``` This happens sometimes (but not every time), when a new backup starts and the old one is still running. I think this is caused by ``` 2023-12-02T00:10:10+0100 3096535 [3]: added partition p1068 < 10680000000 ``` in the new backup.
Author
Owner
deadlock new partition
2023-12-02 2023-12-02
2023-11-25
2023-11-22 2023-11-22
2023-11-20 2023-11-20
2023-11-17 2023-11-17
2023-11-15 2023-11-15
2023-11-13 2023-11-13
2023-11-11 2023-11-11
2023-11-08 2023-11-08
2023-11-06 2023-11-06
2023-11-04 2023-11-04
2023-11-02 2023-11-02
| deadlock | new partition | |------------|---------------| | 2023-12-02 | 2023-12-02 | | | 2023-11-25 | | 2023-11-22 | 2023-11-22 | | 2023-11-20 | 2023-11-20 | | 2023-11-17 | 2023-11-17 | | 2023-11-15 | 2023-11-15 | | 2023-11-13 | 2023-11-13 | | 2023-11-11 | 2023-11-11 | | 2023-11-08 | 2023-11-08 | | 2023-11-06 | 2023-11-06 | | 2023-11-04 | 2023-11-04 | | 2023-11-02 | 2023-11-02 |
Author
Owner

So over the last month we have one case where adding a new partition didn't crash the already running backup (luck?), but every time the backup crashed it was at the same time a new partition was added. So I think the cause is pretty clear.

So over the last month we have one case where adding a new partition didn't crash the already running backup (luck?), but every time the backup crashed it was at the same time a new partition was added. So I think the cause is pretty clear.
Author
Owner

I don't think we can repeat the whole transaction (inserts in different tables in different places), but we commit every 10 files. I think dropping 10 files from the index is acceptable.

I don't think we can repeat the whole transaction (inserts in different tables in different places), but we commit every 10 files. I think dropping 10 files from the index is acceptable.
Sign in to join this conversation.
No Label
No Milestone
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: hjp/simba#2
No description provided.