From 15e6c847929bbf0d31ead576d73eb2802f6c05ed Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BE=90=E8=89=BA=E4=B8=B9?= <53546877+Craven1701@users.noreply.github.com> Date: Wed, 3 Sep 2025 17:24:05 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E5=9C=A8process=5Fload=5Fconfig=E7=9A=84?= =?UTF-8?q?=E4=B8=AD=E6=B7=BB=E5=8A=A0time.sleep,=E9=81=BF=E5=85=8D?= =?UTF-8?q?=E5=9C=A8=E8=BF=9B=E8=A1=8Cbest=5Fconfig=E6=9B=B4=E6=96=B0?= =?UTF-8?q?=E6=97=B6=EF=BC=8Ctrace=E8=BF=98=E6=9C=AA=E6=8A=93=E5=8F=96?= =?UTF-8?q?=E5=AE=8C=E6=AF=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- omniadvisor/src/omniadvisor/interface/hijack_recommend.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/omniadvisor/src/omniadvisor/interface/hijack_recommend.py b/omniadvisor/src/omniadvisor/interface/hijack_recommend.py index cf6b458ece..8c3fffe42d 100644 --- a/omniadvisor/src/omniadvisor/interface/hijack_recommend.py +++ b/omniadvisor/src/omniadvisor/interface/hijack_recommend.py @@ -3,7 +3,7 @@ import json import multiprocessing import re import sys -from typing import Any +import time from common.constant import OA_CONF from common.exceptions import UnknownEncodingError @@ -65,8 +65,8 @@ def _process_load_config(load: Load, config: dict) -> None: :return: """ # 获取测试配置的调优结果 + time.sleep(OA_CONF.spark_fetch_trace_timeout) tuning_result = get_tuning_result(load=load, config=config) - if config == load.best_config: if tuning_result.status == OA_CONF.TuningResultStatus.fail: # 最优配置回滚 -- Gitee From 565dcd53a510c73eeae5f2a4cd83c7d85265688e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BE=90=E8=89=BA=E4=B8=B9?= <53546877+Craven1701@users.noreply.github.com> Date: Wed, 3 Sep 2025 19:52:34 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E8=A1=A5=E5=85=85=E6=B3=A8=E9=87=8A?= =?UTF-8?q?=E8=AF=B4=E6=98=8E?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- omniadvisor/src/omniadvisor/interface/hijack_recommend.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/omniadvisor/src/omniadvisor/interface/hijack_recommend.py b/omniadvisor/src/omniadvisor/interface/hijack_recommend.py index 8c3fffe42d..06fb7628c7 100644 --- a/omniadvisor/src/omniadvisor/interface/hijack_recommend.py +++ b/omniadvisor/src/omniadvisor/interface/hijack_recommend.py @@ -64,8 +64,9 @@ def _process_load_config(load: Load, config: dict) -> None: :param config: 本次测试用配置 :return: """ - # 获取测试配置的调优结果 + # sleep等待 避免最新的trace未抓取完成时去获取历史最优数据 (该情况下正在被抓取trace数据会被遗漏) time.sleep(OA_CONF.spark_fetch_trace_timeout) + # 获取测试配置的调优结果 tuning_result = get_tuning_result(load=load, config=config) if config == load.best_config: if tuning_result.status == OA_CONF.TuningResultStatus.fail: -- Gitee