Fix memgraph crashing on exit

Summary:
Snapshot scheduler object was released from unique ptr and not actually freed, which
caused the snapshooter to access the tx_engine after it was destructed.

Reviewers: mferencevic

Reviewed By: mferencevic

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D1325
This commit is contained in:
Dominik Gleich 2018-03-30 10:05:12 +02:00
parent f8a4fae080
commit 3741c5b45a

View File

@ -271,7 +271,7 @@ PublicBase::~PublicBase() {
tx_engine().LocalForEachActiveTransaction(
[](auto &t) { t.set_should_abort(); });
snapshot_creator_.release();
snapshot_creator_ = nullptr;
if (impl_->config_.snapshot_on_exit) MakeSnapshot();
}