TX - Monitoring Lock wait event
This commit is contained in:
7
deps/oblib/src/lib/stat/ob_latch_define.h
vendored
7
deps/oblib/src/lib/stat/ob_latch_define.h
vendored
@ -142,6 +142,13 @@ LATCH_DEF(APPLY_STATUS_LOCK, 127, "apply_status latch", LATCH_FIFO, 2000, 0, APP
|
||||
LATCH_DEF(ID_SOURCE_LOCK, 128, "ID allocator updates assignable interval lock", LATCH_FIFO, 2000, 0, ID_SOURCE_LOCK_WAIT, "ID allocator updates assignable interval lock")
|
||||
LATCH_DEF(TRANS_AUDIT_RECORD_LOCK, 129, "trans records audit information lock", LATCH_FIFO, 2000, 0, TRANS_AUDIT_RECORD_LOCK_WAIT, "trans records audit information lock")
|
||||
LATCH_DEF(TABLET_MULTI_SOURCE_DATA_LOCK, 130, "tablet multi source data lock", LATCH_FIFO, 2000, 0, TABLET_MULTI_SOURCE_DATA_WAIT, "tablet multi source data lock")
|
||||
LATCH_DEF(WRS_SERVER_VERSION_LOCK, 131, "weak read server version lock", LATCH_FIFO, 2000, 0, WRS_SERVER_VERSION_WAIT, "weak read server version lock")
|
||||
LATCH_DEF(TX_LS_LOG_WRITER_LOCK, 132, "transaction ls log writer lock", LATCH_FIFO, 2000, 0, TX_LS_LOG_WRITER_WAIT, "transaction ls log writer lock")
|
||||
LATCH_DEF(TX_DESC_LOCK, 133, "transaction descriptor lock", LATCH_FIFO, 2000, 0, TX_DESC_WAIT, "transaction descriptor lock")
|
||||
LATCH_DEF(TX_DESC_COMMIT_LOCK, 134, "transaction descriptor commit lock", LATCH_FIFO, 2000, 0, TX_DESC_COMMIT_WAIT, "transaction descriptor commit lock")
|
||||
LATCH_DEF(WRS_CLUSTER_SERVICE_LOCK, 135, "weak read service cluster service lock", LATCH_FIFO, 2000, 0, WRS_CLUSTER_SERVICE_WAIT, "weak read service cluster service lock")
|
||||
LATCH_DEF(TX_STAT_ITEM_LOCK, 136, "transaction stat item lock", LATCH_FIFO, 2000, 0, TX_STAT_ITEM_WAIT, "transaction stat item lock")
|
||||
LATCH_DEF(WRS_CLUSTER_VERSION_MGR_LOCK, 137, "weak read service cluster version manager lock", LATCH_FIFO, 2000, 0, WRS_CLUSTER_VERSION_MGR_WAIT, "weak read service cluster version manager lock")
|
||||
|
||||
LATCH_DEF(LATCH_END, 99999, "latch end", LATCH_FIFO, 2000, 0, WAIT_EVENT_END, "latch end")
|
||||
#endif
|
||||
|
||||
@ -215,6 +215,13 @@ WAIT_EVENT_DEF(ID_SOURCE_LOCK_WAIT, 16014, "ID allocator updates assignable inte
|
||||
WAIT_EVENT_DEF(TRANS_AUDIT_RECORD_LOCK_WAIT, 16015, "trans records audit information lock wait", "", "", "", CONCURRENCY, "TRANS_AUDIT_RECORD_LOCK_WAIT", true)
|
||||
WAIT_EVENT_DEF(TABLET_LOCK_WAIT, 16016, "tablet lock wait", "", "", "", CONCURRENCY, "TABLET_LOCK_WAIT", true)
|
||||
WAIT_EVENT_DEF(TABLET_MULTI_SOURCE_DATA_WAIT, 16017, "tablet multi source data wait", "", "", "", CONCURRENCY, "TABLET_MULTI_SOURCE_DATA_WAIT", true)
|
||||
WAIT_EVENT_DEF(WRS_SERVER_VERSION_WAIT, 16018, "weak read server version wait ", "", "", "", CONCURRENCY, "WRS_SERVER_VERSION_WAIT", true)
|
||||
WAIT_EVENT_DEF(TX_LS_LOG_WRITER_WAIT, 16019, "transaction ls log writer wait", "", "", "", CONCURRENCY, "TX_LS_LOG_WRITER_WAIT", true)
|
||||
WAIT_EVENT_DEF(TX_DESC_WAIT, 16020, "transaction descriptor wait", "", "", "", CONCURRENCY, "TX_DESC_WAIT", true)
|
||||
WAIT_EVENT_DEF(TX_DESC_COMMIT_WAIT, 16021, "transaction descriptor commit wait", "", "", "", CONCURRENCY, "TX_DESC_COMMIT_WAIT", true)
|
||||
WAIT_EVENT_DEF(WRS_CLUSTER_SERVICE_WAIT, 16022, "weak read service cluster service wait", "", "", "", CONCURRENCY, "WRS_CLUSTER_SERVICE_WAIT", true)
|
||||
WAIT_EVENT_DEF(TX_STAT_ITEM_WAIT, 16023, "transaction stat item wait", "", "", "", CONCURRENCY, "TX_STAT_ITEM_WAIT", true)
|
||||
WAIT_EVENT_DEF(WRS_CLUSTER_VERSION_MGR_WAIT, 16024, "weak read service cluster version manager wait", "", "", "", CONCURRENCY, "WRS_CLUSTER_VERSION_MGR_WAIT", true)
|
||||
|
||||
//replication group
|
||||
WAIT_EVENT_DEF(RG_TRANSFER_LOCK_WAIT, 17000, "transfer lock wait", "src_rg", "dst_rg", "transfer_pkey", CONCURRENCY, "transfer lock wait", false)
|
||||
|
||||
@ -196,9 +196,9 @@ int ObExprToOutfileRow::to_outfile_str(const ObExpr &expr, ObEvalCtx &ctx, ObDat
|
||||
MEMCPY(res_buf, buf, pos);
|
||||
expr_datum.set_string(res_buf, pos);
|
||||
}
|
||||
}
|
||||
} while (OB_SIZE_OVERFLOW == ret
|
||||
&& OB_SUCC(extend_buffer(*out_info, ctx.exec_ctx_.get_allocator())));
|
||||
}
|
||||
} while (OB_SIZE_OVERFLOW == ret
|
||||
&& OB_SUCC(extend_buffer(*out_info, ctx.exec_ctx_.get_allocator())));
|
||||
}
|
||||
}
|
||||
return ret;
|
||||
|
||||
@ -23,6 +23,7 @@
|
||||
#include "share/ob_define.h"
|
||||
#include "common/storage/ob_sequence.h"
|
||||
#include "lib/oblog/ob_log_module.h"
|
||||
#include "lib/stat/ob_latch_define.h"
|
||||
|
||||
#define USING_LOG_PREFIX TRANS
|
||||
namespace oceanbase
|
||||
@ -222,7 +223,8 @@ ObTxDesc::ObTxDesc()
|
||||
commit_out_(-1),
|
||||
abort_cause_(0),
|
||||
can_elr_(false),
|
||||
lock_(),
|
||||
lock_(common::ObLatchIds::TX_DESC_LOCK),
|
||||
commit_cb_lock_(common::ObLatchIds::TX_DESC_COMMIT_LOCK),
|
||||
commit_cb_(NULL),
|
||||
exec_info_reap_ts_(0),
|
||||
brpc_mask_set_(),
|
||||
|
||||
@ -22,7 +22,8 @@ namespace transaction
|
||||
class ObTransStatItem
|
||||
{
|
||||
public:
|
||||
explicit ObTransStatItem(const char *const item_name) : item_name_(item_name) { reset(); }
|
||||
explicit ObTransStatItem(const char *const item_name)
|
||||
: item_name_(item_name), lock_(common::ObLatchIds::TX_STAT_ITEM_LOCK) { reset(); }
|
||||
~ObTransStatItem() { destroy(); }
|
||||
void reset();
|
||||
void destroy() { reset(); }
|
||||
|
||||
@ -15,6 +15,7 @@
|
||||
#include "storage/tx/ob_trans_id_service.h"
|
||||
#include "logservice/ob_log_base_header.h"
|
||||
#include "storage/tx/ob_trans_ctx_mgr.h"
|
||||
#include "lib/stat/ob_latch_define.h"
|
||||
|
||||
namespace oceanbase
|
||||
{
|
||||
@ -160,7 +161,7 @@ int ObTxLSLogCb::alloc_log_buf_()
|
||||
//********************************************************
|
||||
|
||||
//******************** ObTxLSLogWriter *******************
|
||||
ObTxLSLogWriter::ObTxLSLogWriter() { reset(); }
|
||||
ObTxLSLogWriter::ObTxLSLogWriter() : cbs_lock_(common::ObLatchIds::TX_LS_LOG_WRITER_LOCK) { reset(); }
|
||||
|
||||
ObTxLSLogWriter::~ObTxLSLogWriter() { reset(); }
|
||||
|
||||
|
||||
@ -14,6 +14,7 @@
|
||||
|
||||
#include "share/inner_table/ob_inner_table_schema_constants.h" // OB_ALL_WEAK_READ_SERVICE_TNAME
|
||||
#include "lib/mysqlclient/ob_mysql_result.h" // ObMySQLResult
|
||||
#include "lib/stat/ob_latch_define.h"
|
||||
#include "ob_weak_read_util.h"
|
||||
#include "rpc/obrpc/ob_rpc_net_handler.h"
|
||||
#include "storage/tx_storage/ob_ls_service.h"
|
||||
@ -54,7 +55,7 @@ ObTenantWeakReadClusterService::ObTenantWeakReadClusterService() :
|
||||
min_version_(0),
|
||||
max_version_(0),
|
||||
cluster_version_mgr_(),
|
||||
rwlock_()
|
||||
rwlock_(common::ObLatchIds::WRS_CLUSTER_SERVICE_LOCK)
|
||||
{}
|
||||
|
||||
ObTenantWeakReadClusterService::~ObTenantWeakReadClusterService()
|
||||
|
||||
@ -14,6 +14,7 @@
|
||||
|
||||
#include "share/ob_errno.h"
|
||||
#include "ob_tenant_weak_read_cluster_version_mgr.h"
|
||||
#include "lib/stat/ob_latch_define.h"
|
||||
|
||||
namespace oceanbase
|
||||
{
|
||||
@ -25,7 +26,7 @@ namespace transaction
|
||||
ObTenantWeakReadClusterVersionMgr::ObTenantWeakReadClusterVersionMgr() :
|
||||
tenant_id_(OB_INVALID_ID),
|
||||
svr_array_(),
|
||||
rwlock_()
|
||||
rwlock_(common::ObLatchIds::WRS_CLUSTER_VERSION_MGR_LOCK)
|
||||
{}
|
||||
|
||||
ObTenantWeakReadClusterVersionMgr::~ObTenantWeakReadClusterVersionMgr()
|
||||
|
||||
@ -15,6 +15,7 @@
|
||||
#include "share/ob_errno.h"
|
||||
#include "share/ob_define.h" // is_valid_read_snapshot_version
|
||||
#include "ob_tenant_weak_read_server_version_mgr.h"
|
||||
#include "lib/stat/ob_latch_define.h"
|
||||
|
||||
using namespace oceanbase::common;
|
||||
namespace oceanbase
|
||||
@ -24,7 +25,7 @@ namespace transaction
|
||||
|
||||
ObTenantWeakReadServerVersionMgr::ObTenantWeakReadServerVersionMgr() :
|
||||
server_version_(),
|
||||
rwlock_(),
|
||||
rwlock_(common::ObLatchIds::WRS_SERVER_VERSION_LOCK),
|
||||
server_version_for_stat_()
|
||||
{}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user