fixed read data from oss successfully but return OB_TIMEOUT.
This commit is contained in:
@ -323,10 +323,7 @@ int ObLogExternalStorageHandler::wait_async_tasks_finished_(
|
||||
const int64_t DEFAULT_WAIT_US = 50 * 1000;
|
||||
int64_t print_log_interval = OB_INVALID_TIMESTAMP;
|
||||
// if async_task_ctx->wait return OB_SUCCESS, means there is no flying task.
|
||||
// if async_task_ctx->wait return error except OB_TIMEOUT, we can not return
|
||||
// the errno until async_task_ctx has no flying task.
|
||||
while (OB_FAIL(async_task_ctx->wait(DEFAULT_WAIT_US))
|
||||
&& async_task_ctx->has_flying_async_task()) {
|
||||
while (OB_FAIL(async_task_ctx->wait(DEFAULT_WAIT_US))) {
|
||||
if (palf::palf_reach_time_interval(500*1000, print_log_interval)) {
|
||||
CLOG_LOG(WARN, "wait ObLogExternalStorageIOTaskCtx failed", KPC(async_task_ctx));
|
||||
}
|
||||
|
@ -100,7 +100,7 @@ int ObLogExternalStorageIOTaskCtx::wait(const int64_t timeout_us)
|
||||
{
|
||||
int ret = OB_SUCCESS;
|
||||
ObThreadCondGuard guard(condition_);
|
||||
while (OB_SUCC(ret) && flying_task_count_ > 0) {
|
||||
while (flying_task_count_ > 0 && OB_SUCC(ret)) {
|
||||
ret = condition_.wait_us(timeout_us);
|
||||
}
|
||||
return ret;
|
||||
|
Reference in New Issue
Block a user