feat: Add support for site level resync (#15753)

This commit is contained in:
Poorna
2022-11-14 07:16:40 -08:00
committed by GitHub
parent 7ac64ad24a
commit d6bc141bd1
18 changed files with 1442 additions and 120 deletions

View File

@@ -437,6 +437,7 @@ func (s *peerRESTServer) GetMetricsHandler(w http.ResponseWriter, r *http.Reques
diskMap[disk] = struct{}{}
}
jobID := r.Form.Get(peerRESTJobID)
depID := r.Form.Get(peerRESTDepID)
ctx, cancel := context.WithCancel(r.Context())
defer cancel()
@@ -444,8 +445,8 @@ func (s *peerRESTServer) GetMetricsHandler(w http.ResponseWriter, r *http.Reques
info := collectLocalMetrics(types, collectMetricsOpts{
disks: diskMap,
jobID: jobID,
depID: depID,
})
logger.LogIf(ctx, gob.NewEncoder(w).Encode(info))
}