Fix bug in transactions/engine

Reviewers: buda, teon.banek

Reviewed By: buda

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D560
This commit is contained in:
Mislav Bradac 2017-07-17 14:15:37 +02:00
parent 50cd53e5c9
commit 1c6ef47994

View File

@ -148,7 +148,7 @@ class Engine : Lockable<SpinLock> {
/** Calls function f on each active transaction. */
void ForEachActiveTransaction(std::function<void(Transaction &)> f) {
this->acquire_unique();
auto guard = this->acquire_unique();
for (auto transaction : active_) {
f(*store_.get(transaction));
}