Reset TransactionEngine internal state on Abort

Summary:
With neo4j java driver 1.7.0. they don't send `ROLLBACK`. This causes
unexpected nested transaction errors. This diff should fix that.

Reviewers: mferencevic

Reviewed By: mferencevic

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D1780
This commit is contained in:
Matija Santl 2018-12-19 15:37:38 +01:00
parent 8c51d2fa0b
commit 2b3d19e508

View File

@ -93,6 +93,8 @@ class TransactionEngine final {
void Abort() {
results_ = std::experimental::nullopt;
expect_rollback_ = false;
in_explicit_transaction_ = false;
if (!db_accessor_) return;
db_accessor_->Abort();
db_accessor_ = nullptr;