add debug logging

This commit is contained in:
Konstantin Lebedev 2021-03-15 19:33:33 +05:00
parent 7194a5e7bf
commit 46b9f5cff4
2 changed files with 4 additions and 2 deletions

View file

@ -73,9 +73,11 @@ func StreamContent(masterClient wdclient.HasLookupFileIdFunction, w io.Writer, c
func CheckAllChunkViews(chunkViews []*ChunkView, fileId2Url *map[string][]string, gErr *errgroup.Group) { func CheckAllChunkViews(chunkViews []*ChunkView, fileId2Url *map[string][]string, gErr *errgroup.Group) {
for _, chunkView := range chunkViews { for _, chunkView := range chunkViews {
urlStrings := (*fileId2Url)[chunkView.FileId]
glog.V(9).Infof("Check chunk: %+v\n url: %v", chunkView, urlStrings)
gErr.Go(func() error { gErr.Go(func() error {
_, err := retriedFetchChunkData( _, err := retriedFetchChunkData(
(*fileId2Url)[chunkView.FileId], urlStrings,
chunkView.CipherKey, chunkView.CipherKey,
chunkView.IsGzipped, chunkView.IsGzipped,
chunkView.IsFullChunk(), chunkView.IsFullChunk(),

View file

@ -27,7 +27,7 @@ var fileNameEscaper = strings.NewReplacer(`\`, `\\`, `"`, `\"`)
func (vs *VolumeServer) GetOrHeadHandler(w http.ResponseWriter, r *http.Request) { func (vs *VolumeServer) GetOrHeadHandler(w http.ResponseWriter, r *http.Request) {
// println(r.Method + " " + r.URL.Path) glog.V(9).Info(r.Method + " " + r.URL.Path + " " + r.Header.Get("Range"))
stats.VolumeServerRequestCounter.WithLabelValues("get").Inc() stats.VolumeServerRequestCounter.WithLabelValues("get").Inc()
start := time.Now() start := time.Now()