Удаление снимка с транзакцией

This commit is contained in:
Alexander Zhirov 2025-09-12 17:12:34 +03:00
parent e42aacbed7
commit e8f29b6130
Signed by: alexander
GPG key ID: C8D8BE544A27C511

View file

@ -159,7 +159,23 @@ public:
void removeSnapshot(const ref Snapshot snapshot)
{
_db.beginImmediate();
bool ok;
scope (exit)
{
if (!ok)
_db.rollback();
}
scope (success)
{
_db.commit();
}
_db.deleteSnapshot(snapshot.id);
ok = true;
}
string getVersion() {