Race condition when trying to delete two snapshots at once
After deleting a lot of snapshots at once in Reforis, some of the snapshots I deleted no longer exist and don't have a size, but are still shown in schnapps list
. I can reproduce this with plain schnapps by running two delete
commands at once, so I think the protection against multiple concurrent runs is not correct.
root@turris:~# schnapps list
# | Type | Size | Date | Description
------+-----------+-------------+---------------------------+------------------------------------
1 | single | 16.00KiB | 2022-08-19 22:11:15 +0200 | User created snapshot
3 | single | 16.00KiB | 2022-08-19 22:13:04 +0200 | User created snapshot
4 | single | | 2022-08-19 22:13:05 +0200 | User created snapshot
5 | single | 16.00KiB | 2022-08-19 22:13:16 +0200 | User created snapshot
6 | single | | 2022-08-19 22:13:16 +0200 | User created snapshot
7 | single | 16.00KiB | 2022-08-19 22:13:17 +0200 | User created snapshot
10 | single | | 2022-08-19 22:13:19 +0200 | User created snapshot
11 | single | | 2022-08-19 22:13:20 +0200 | User created snapshot
12 | single | 16.00KiB | 2022-08-19 22:13:20 +0200 | User created snapshot
13 | single | 16.00KiB | 2022-08-19 22:13:21 +0200 | User created snapshot
14 | single | | 2022-08-19 22:13:22 +0200 | User created snapshot
19 | single | | 2022-08-19 22:13:26 +0200 | User created snapshot
20 | single | | 2022-08-19 22:13:27 +0200 | User created snapshot
43 | pre | | 2022-07-19 11:19:55 +0200 | Automatic pre-update snapshot (TurrisOS 6.0)
48 | post | | 2022-08-11 18:56:15 +0200 | Automatic post-update snapshot (TurrisOS 6.0)
root@turris:~# schnapps delete 48
WARNING: Snapshot number 48 does not exists!
schnapps delete
should either delete the snapshots properly or not delete them at all.