patch tair code removing from 22x to 31CE

This commit is contained in:
ly0
2022-04-06 10:56:12 +08:00
committed by LINxiansheng
parent 518fd3552f
commit 68cd558747
71 changed files with 1310 additions and 1764 deletions

View File

@ -195,7 +195,7 @@ void ObLockWaitMgr::wakeup(uint64_t hash)
if (NULL != node) {
EVENT_INC(MEMSTORE_WRITE_LOCK_WAKENUP_COUNT);
EVENT_ADD(MEMSTORE_WAIT_WRITE_LOCK_TIME, obsys::CTimeUtil::getTime() - node->lock_ts_);
EVENT_ADD(MEMSTORE_WAIT_WRITE_LOCK_TIME, obsys::ObSysTimeUtil::getTime() - node->lock_ts_);
node->on_retry_lock(hash);
(void)repost(node);
@ -231,7 +231,7 @@ ObLockWaitMgr::Node* ObLockWaitMgr::fetch_waiter(uint64_t hash)
// we do not need to wake up if the request is not running
while (NULL != node && node->hash() <= hash) {
if (node->hash() == hash) {
if (node->get_run_ts() > obsys::CTimeUtil::getTime()) {
if (node->get_run_ts() > obsys::ObSysTimeUtil::getTime()) {
// wake up the first task whose execution time is not yet
break;
} else {
@ -287,7 +287,7 @@ ObLink* ObLockWaitMgr::check_timeout()
// it needs to be placed before the judgment of session_id to prevent the
// abnormal case which session_id equals 0 from causing the problem of missing wakeup
} else if (iter->is_standalone_task() ||
(iter->get_run_ts() > 0 && obsys::CTimeUtil::getTime() > iter->get_run_ts())) {
(iter->get_run_ts() > 0 && obsys::ObSysTimeUtil::getTime() > iter->get_run_ts())) {
node2del = iter;
need_check_session = true;
// it is desgined to fix the case once the lock_for_write does not try
@ -376,7 +376,7 @@ void ObLockWaitMgr::retire_node(ObLink*& tail, Node* node)
int err = 0;
Node* tmp_node = NULL;
EVENT_INC(MEMSTORE_WRITE_LOCK_WAKENUP_COUNT);
EVENT_ADD(MEMSTORE_WAIT_WRITE_LOCK_TIME, obsys::CTimeUtil::getTime() - node->lock_ts_);
EVENT_ADD(MEMSTORE_WAIT_WRITE_LOCK_TIME, obsys::ObSysTimeUtil::getTime() - node->lock_ts_);
while (-EAGAIN == (err = hash_.del(node, tmp_node)))
;
if (0 == err) {
@ -394,7 +394,7 @@ void ObLockWaitMgr::delay_header_node_run_ts(const Key& key)
if (NULL != node && !node->is_dummy()) {
// delay the execution of the header node by 10ms to ensure that the remote
// request can be executed successfully
node->update_run_ts(obsys::CTimeUtil::getTime() + 50 * 1000);
node->update_run_ts(obsys::ObSysTimeUtil::getTime() + 50 * 1000);
TRANS_LOG(INFO, "LOCK_MGR: delay header node");
}
}