Skip to content

Commit e238c0d

Browse files
committed
Review fixes
* Move resetting is_bf_immutable_ into trasaction::cleanup() to ensure that it is reset to false regardless how the transaction terminates. * Removed redundant lock()/unlock() methods from mock_client_state.
1 parent b76e94f commit e238c0d

File tree

2 files changed

+1
-4
lines changed

2 files changed

+1
-4
lines changed

src/transaction.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -648,7 +648,6 @@ int wsrep::transaction::after_commit()
648648
}
649649
assert(ret == 0);
650650
state(lock, s_committed);
651-
is_bf_immutable_ = false;
652651
debug_log_state("after_commit_leave");
653652
return ret;
654653
}
@@ -828,7 +827,6 @@ int wsrep::transaction::after_statement()
828827
state() == s_must_abort ||
829828
state() == s_cert_failed ||
830829
state() == s_must_replay);
831-
assert(not is_bf_immutable_);
832830

833831
if (state() == s_executing &&
834832
streaming_context_.fragment_size() &&
@@ -2110,6 +2108,7 @@ void wsrep::transaction::cleanup()
21102108
client_service_.cleanup_transaction();
21112109
apply_error_buf_.clear();
21122110
xid_.clear();
2111+
is_bf_immutable_ = false;
21132112
debug_log_state("cleanup_leave");
21142113
}
21152114

test/mock_client_state.hpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,6 @@ namespace wsrep
4949
(void)client_service().bf_rollback();
5050
}
5151
}
52-
void lock() { mutex_.lock(); }
53-
void unlock() { mutex_.unlock(); }
5452
private:
5553
wsrep::default_mutex mutex_;
5654
wsrep::default_condition_variable cond_;

0 commit comments

Comments
 (0)