From dd30da929d00e1fd7a7f5e9cd9f62ae960472260 Mon Sep 17 00:00:00 2001 From: zhjc1124 Date: Tue, 17 Dec 2024 10:45:19 +0000 Subject: [PATCH] fix ObIOBenchController core --- src/share/io/ob_io_calibration.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/share/io/ob_io_calibration.cpp b/src/share/io/ob_io_calibration.cpp index 5cc994701..da3086f2a 100644 --- a/src/share/io/ob_io_calibration.cpp +++ b/src/share/io/ob_io_calibration.cpp @@ -501,6 +501,12 @@ int ObIOBenchController::start_io_bench() ret = OB_SUCCESS; } } else { + if (-1 != tg_id_) { + TG_STOP(tg_id_); + TG_WAIT(tg_id_); + TG_DESTROY(tg_id_); + tg_id_ = -1; + } if (OB_FAIL(TG_CREATE(TGDefIDs::IO_BENCHMARK, tg_id_))) { LOG_WARN("create tg failed", K(ret)); } else if (OB_FAIL(TG_SET_RUNNABLE_AND_START(tg_id_, *this))) { @@ -620,7 +626,6 @@ void ObIOBenchController::run1() ret_code_ = ret; finish_ts_ = ObTimeUtility::fast_current_time(); - TG_DESTROY(tg_id_); } int64_t ObIOBenchController::get_start_timestamp()