From 337b77b6e767b4f15914cad0f0f51774966a59a7 Mon Sep 17 00:00:00 2001 From: oceanoverflow Date: Thu, 31 Aug 2023 03:40:42 +0000 Subject: [PATCH] add wait guard to allow 509 tenant queue dynamic grow and shrink --- src/storage/ob_storage_rpc.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/storage/ob_storage_rpc.cpp b/src/storage/ob_storage_rpc.cpp index b3decf00cf..82a049de3b 100644 --- a/src/storage/ob_storage_rpc.cpp +++ b/src/storage/ob_storage_rpc.cpp @@ -27,9 +27,11 @@ #include "storage/tablet/ob_tablet_iterator.h" #include "storage/tablet/ob_tablet.h" #include "storage/high_availability/ob_storage_ha_utils.h" +#include "lib/thread/thread.h" namespace oceanbase { +using namespace lib; using namespace common; using namespace share; using namespace obrpc; @@ -1230,6 +1232,7 @@ int ObStorageStreamRpcP::flush_and_wait() ret = OB_NOT_INIT; STORAGE_LOG(WARN, "bandwidth_throttle_ must not null", K(ret)); } else { + Thread::WaitGuard guard(Thread::WAIT_FOR_IO_EVENT); if (OB_SUCCESS != (tmp_ret = bandwidth_throttle_->limit_out_and_sleep( this->result_.get_position(), last_send_time_, max_idle_time))) { STORAGE_LOG(WARN, "failed limit out band", K(tmp_ret));