add px msg wait guard

This commit is contained in:
sdc
2023-09-12 12:40:10 +00:00
committed by ob-robot
parent 7b972979cf
commit d91601fa9a
2 changed files with 2 additions and 0 deletions

View File

@ -144,6 +144,7 @@ public:
static constexpr uint8_t WAIT_IN_TENANT_QUEUE = (1 << 1);
static constexpr uint8_t WAIT_FOR_IO_EVENT = (1 << 2);
static constexpr uint8_t WAIT_FOR_LOCAL_RETRY = (1 << 3); //Statistics of local retry waiting time for dynamically increasing threads.
static constexpr uint8_t WAIT_FOR_PX_MSG = (1 << 4);
// for thread diagnose, maybe replace it with union later.
static thread_local int64_t loop_ts_;
static thread_local pthread_t thread_joined_;

View File

@ -833,6 +833,7 @@ int ObDtlBasicChannel::wait_unblocking()
int64_t print_log_t = 10 * 60 * 1000000;
block_proc_.set_ch_idx_var(&idx);
LOG_TRACE("wait unblocking", K(ret), K(dfc_->is_block()), KP(id_), K(peer_));
oceanbase::lib::Thread::WaitGuard guard(oceanbase::lib::Thread::WAIT_FOR_PX_MSG);
do {
int64_t got_channel_idx = idx;
if (is_drain()) {