Issue #5842: write prepare policy, before XA commit, shutdown will core

This commit is contained in:
dangzhonghua 2019-09-23 19:03:17 +08:00
parent e8263dbdaa
commit 4277f1065f

View File

@ -527,9 +527,12 @@ class WritePreparedTxnDB : public PessimisticTransactionDB {
public: public:
~PreparedHeap() { ~PreparedHeap() {
if (!TEST_CRASH_) { /*
assert(heap_.empty()); Assert prepared_txns_ is empty is ideal case. In XA
assert(erased_heap_.empty()); transactions scenario the prepared_txns_ is non-empty since some
transactions are not committed but be prepared. So the assert is
disabled.
*/
} }
} }
port::Mutex* push_pop_mutex() { return &push_pop_mutex_; } port::Mutex* push_pop_mutex() { return &push_pop_mutex_; }