remove unused statistic event

This commit is contained in:
zh0
2022-03-28 16:36:07 +08:00
committed by LINxiansheng
parent 6b4f10f4ac
commit ada79c48a2
16 changed files with 118 additions and 79 deletions

View File

@ -797,7 +797,8 @@ int ObMemtableCtx::do_trans_end(const bool commit, const int64_t trans_version,
}
(void)partition_audit_info_cache_.stmt_end_update_audit_info(commit);
// flush partition audit statistics cached in ctx to partition
if (NULL != ATOMIC_LOAD(&ctx_) && OB_UNLIKELY(OB_SUCCESS != (tmp_ret = flush_audit_partition_cache_(commit)))) {
if (GCONF.enable_record_trace_log && NULL != ATOMIC_LOAD(&ctx_) &&
OB_UNLIKELY(OB_SUCCESS != (tmp_ret = flush_audit_partition_cache_(commit)))) {
TRANS_LOG(WARN, "flush audit partition cache error", K(tmp_ret), K(commit), K(*ctx_));
}
}
@ -934,7 +935,7 @@ void ObMemtableCtx::trans_mgr_sub_trans_end_(bool commit)
set_read_elr_data(false);
trans_mgr_.sub_trans_end(commit);
// update partition audit
if (GCONF.enable_sql_audit) {
if (GCONF.enable_record_trace_log) {
(void)partition_audit_info_cache_.stmt_end_update_audit_info(commit);
}
}
@ -1235,9 +1236,7 @@ int ObMemtableCtx::audit_partition_cache_(const enum ObPartitionAuditOperator op
{
int ret = OB_SUCCESS;
if (!GCONF.enable_sql_audit) {
// do nothing
} else if (OB_FAIL(partition_audit_info_cache_.update_audit_info(op, count))) {
if (OB_FAIL(partition_audit_info_cache_.update_audit_info(op, count))) {
TRANS_LOG(WARN, "update audit info", K(ret), K(*ctx_));
}
@ -1250,12 +1249,7 @@ int ObMemtableCtx::flush_audit_partition_cache_(bool commit)
int ret = OB_SUCCESS;
ObPartitionTransCtxMgr* partition_mgr = NULL;
if (!GCONF.enable_sql_audit) {
// do nothing
} else if (OB_ISNULL(ctx_)) {
ret = OB_ERR_UNEXPECTED;
TRANS_LOG(WARN, "memtable ctx is NULL", K(ret), KP(ctx_));
} else if (OB_ISNULL(partition_mgr = ctx_->get_partition_mgr())) {
if (OB_ISNULL(partition_mgr = ctx_->get_partition_mgr())) {
ret = OB_ERR_UNEXPECTED;
TRANS_LOG(WARN, "partition mgr is NULL", K(ret), K(*ctx_));
} else if (OB_FAIL(partition_mgr->audit_partition(partition_audit_info_cache_, commit))) {