From 675c166254b1db9df27553c4921d3a08210827aa Mon Sep 17 00:00:00 2001 From: Josip Mrden <josip.mrden@memgraph.io> Date: Wed, 7 Feb 2024 14:19:07 +0100 Subject: [PATCH] Adjust when the condition is applied --- src/storage/v2/mvcc.hpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/storage/v2/mvcc.hpp b/src/storage/v2/mvcc.hpp index 18af2a11d..28b19e3e5 100644 --- a/src/storage/v2/mvcc.hpp +++ b/src/storage/v2/mvcc.hpp @@ -180,6 +180,9 @@ inline void CreateAndLinkDelta(Transaction *transaction, TObj *object, Args &&.. return; } transaction->EnsureCommitTimestampExists(); + + IncrementDeltasChanged(transaction); + auto delta = &transaction->deltas.use().emplace_back(std::forward<Args>(args)..., transaction->commit_timestamp.get(), transaction->command_id); @@ -204,8 +207,6 @@ inline void CreateAndLinkDelta(Transaction *transaction, TObj *object, Args &&.. // modification is being done, everybody else will wait until we are fully // done with our modification before they read the object's delta value. object->delta = delta; - - IncrementDeltasChanged(transaction); } } // namespace memgraph::storage