Skip to content

fix: run dependent detection stages sequentially - #10

Open
BaoZhiFei wants to merge 1 commit into
V2RaySSR:mainfrom
BaoZhiFei:fix/sequential-pipeline-stages
Open

fix: run dependent detection stages sequentially#10
BaoZhiFei wants to merge 1 commit into
V2RaySSR:mainfrom
BaoZhiFei:fix/sequential-pipeline-stages

Conversation

@BaoZhiFei

Copy link
Copy Markdown

背景

单个域名的网络检测阶段共享并修改同一个 DetectionResult,且阶段之间
存在数据依赖。例如 TLS 检测依赖重定向后的最终域名,热门网站检测依赖
Network 和 CDN 结果。

当前实现并发执行这些阶段,不仅会导致数据竞争,也可能让后续阶段在前置
结果尚未生成时开始检测。

修改

  • 按既有优先级顺序执行单域名的网络检测阶段
  • 保留批量管理器在不同域名之间的并发
  • 保留单个检测阶段的 panic 恢复行为
  • 更新已不符合实际行为的函数名和注释
  • 增加阶段顺序、数据依赖和 panic 恢复测试

验证

  • go test ./...
  • go test -race ./internal/core
  • go vet ./...
  • git diff --check

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant