fix(reliability): 采集器并发去重 + 备份恢复即时重载 + context 贯穿请求链

- CollectorService 安装/卸载按采集器互斥去重(重复触发不再并发 docker rm/run 互踩);删除后卸载失败留日志
- ApplyStagedBackup 替换文件后立即 Reload 内存态,消除「重启前旧内存落盘覆盖恢复文件」竞态;暂存文件名升级 lokistack.json(兼容旧名)
- GetUsage/Validate 全链路 context 贯穿:请求取消即中止 SSH/k8s 查询(异步调用点显式 Background)
This commit is contained in:
opsx committed 2026-10-29 13:29:25 +08:00
1 parent 9daaf7f403
commit 572efc89a4
9 files changed
+180 -29

No files matched your search

+1 -1
View File
@@ -217,7 +217,7 @@ func (ctrl *DeploymentController) GetUsage(c *gin.Context) {
utils.BadRequest(c, "ID 无效")
return
}
usage, err := ctrl.service.GetUsage(uint(id))
usage, err := ctrl.service.GetUsage(c.Request.Context(), uint(id))
if err != nil {
utils.Error(c, 400, err.Error())
return