skip sanity check of log sync on memctx if forcedly killed

This commit is contained in:
chinaxing
2024-03-11 08:15:50 +00:00
committed by ob-robot
parent bec2e6453f
commit ff29d48d7c

View File

@ -122,13 +122,18 @@ void ObMemtableCtx::reset()
TRANS_LOG_RET(ERROR, OB_ERR_UNEXPECTED, "txn unsubmitted cnt not zero", K(*this), K(unsubmitted_cnt_)); TRANS_LOG_RET(ERROR, OB_ERR_UNEXPECTED, "txn unsubmitted cnt not zero", K(*this), K(unsubmitted_cnt_));
ob_abort(); ob_abort();
} }
const int64_t fill = log_gen_.get_redo_filled_count(); if (OB_TRANS_KILLED != end_code_) {
const int64_t sync_succ = log_gen_.get_redo_sync_succ_count(); // _NOTE_: skip when txn was forcedly killed
const int64_t sync_fail = log_gen_.get_redo_sync_fail_count(); // if txn killed forcedly, callbacks of log unsynced will not been processed
if (OB_UNLIKELY(fill != sync_succ + sync_fail)) { // after log sync succeed
TRANS_LOG_RET(ERROR, OB_ERR_UNEXPECTED, "redo filled_count != sync_succ + sync_fail", KPC(this), const int64_t fill = log_gen_.get_redo_filled_count();
const int64_t sync_succ = log_gen_.get_redo_sync_succ_count();
const int64_t sync_fail = log_gen_.get_redo_sync_fail_count();
if (OB_UNLIKELY(fill != sync_succ + sync_fail)) {
TRANS_LOG_RET(ERROR, OB_ERR_UNEXPECTED, "redo filled_count != sync_succ + sync_fail", KPC(this),
K(fill), K(sync_succ), K(sync_fail)); K(fill), K(sync_succ), K(sync_fail));
ob_abort(); ob_abort();
}
} }
is_inited_ = false; is_inited_ = false;
callback_free_count_ = 0; callback_free_count_ = 0;