From e8f29b6130d66e80f9d95303ae6d106fc0c3d73a Mon Sep 17 00:00:00 2001 From: Alexander Zhirov Date: Fri, 12 Sep 2025 17:12:34 +0300 Subject: [PATCH] =?UTF-8?q?=D0=A3=D0=B4=D0=B0=D0=BB=D0=B5=D0=BD=D0=B8?= =?UTF-8?q?=D0=B5=20=D1=81=D0=BD=D0=B8=D0=BC=D0=BA=D0=B0=20=D1=81=20=D1=82?= =?UTF-8?q?=D1=80=D0=B0=D0=BD=D0=B7=D0=B0=D0=BA=D1=86=D0=B8=D0=B5=D0=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- source/cdcdb/cdc/cas.d | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/source/cdcdb/cdc/cas.d b/source/cdcdb/cdc/cas.d index 03e0f82..eb68678 100644 --- a/source/cdcdb/cdc/cas.d +++ b/source/cdcdb/cdc/cas.d @@ -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() {