修复: 全局参数线程安全 + copy保护 + 回调只清除受影响算法缓存

This commit is contained in:
2026-04-13 10:21:19 +08:00
parent 3266241064
commit 56f39f1be7
2 changed files with 8 additions and 4 deletions

View File

@@ -2098,7 +2098,8 @@ class AlgorithmManager:
algo_params = self.default_params.get(algorithm_type, {}).copy()
# 三级合并:默认参数 → 全局参数 → 绑定级参数
global_p = self._global_params.get(algorithm_type, {})
with self._update_lock:
global_p = self._global_params.get(algorithm_type, {}).copy()
if global_p:
algo_params.update(global_p)
if params: