[CP] fix missing px_loop_cond_wait wait event
This commit is contained in:
14
deps/oblib/src/lib/lock/ob_scond.h
vendored
14
deps/oblib/src/lib/lock/ob_scond.h
vendored
@ -33,10 +33,16 @@ public:
|
||||
uint32_t get_key() { return ATOMIC_LOAD(&futex_.uval()); }
|
||||
void wait(uint32_t key, int64_t timeout) {
|
||||
if (timeout > 0 && get_key() == key) {
|
||||
ObWaitEventGuard guard(event_no_, timeout / 1000, reinterpret_cast<int64_t>(this), 0, 0, true);
|
||||
ATOMIC_FAA(&n_waiters_, 1);
|
||||
futex_.wait(key, timeout);
|
||||
ATOMIC_FAA(&n_waiters_, -1);
|
||||
if (ObWaitEventIds::DEFAULT_COND_WAIT != event_no_) {
|
||||
ObWaitEventGuard guard(event_no_, timeout / 1000, reinterpret_cast<int64_t>(this), 0, 0, true);
|
||||
ATOMIC_FAA(&n_waiters_, 1);
|
||||
futex_.wait(key, timeout);
|
||||
ATOMIC_FAA(&n_waiters_, -1);
|
||||
} else {
|
||||
ATOMIC_FAA(&n_waiters_, 1);
|
||||
futex_.wait(key, timeout);
|
||||
ATOMIC_FAA(&n_waiters_, -1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
4
deps/oblib/src/lib/stat/ob_diagnose_info.cpp
vendored
4
deps/oblib/src/lib/stat/ob_diagnose_info.cpp
vendored
@ -641,8 +641,8 @@ ObWaitEventGuard::ObWaitEventGuard(const int64_t event_no, const uint64_t timeou
|
||||
: event_no_(0), di_(nullptr), is_atomic_(is_atomic)
|
||||
{
|
||||
di_ = ObLocalDiagnosticInfo::get();
|
||||
if (OB_NOT_NULL(di_) && oceanbase::lib::is_diagnose_info_enabled() &&
|
||||
di_->get_ash_stat().is_active_session_) { need_record_ = true;
|
||||
if (OB_NOT_NULL(di_) && di_->get_ash_stat().is_active_session_ && oceanbase::lib::is_diagnose_info_enabled()) {
|
||||
need_record_ = true;
|
||||
event_no_ = event_no;
|
||||
di_->begin_wait_event(event_no, timeout_ms, p1, p2, p3);
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user