From 46b9f5cff470d24dab87a2e7737f00ef3c2c98ae Mon Sep 17 00:00:00 2001 From: Konstantin Lebedev Date: Mon, 15 Mar 2021 19:33:33 +0500 Subject: [PATCH] add debug logging --- weed/filer/stream.go | 4 +++- weed/server/volume_server_handlers_read.go | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/weed/filer/stream.go b/weed/filer/stream.go index 7e041e213..4353b1f07 100644 --- a/weed/filer/stream.go +++ b/weed/filer/stream.go @@ -73,9 +73,11 @@ func StreamContent(masterClient wdclient.HasLookupFileIdFunction, w io.Writer, c func CheckAllChunkViews(chunkViews []*ChunkView, fileId2Url *map[string][]string, gErr *errgroup.Group) { for _, chunkView := range chunkViews { + urlStrings := (*fileId2Url)[chunkView.FileId] + glog.V(9).Infof("Check chunk: %+v\n url: %v", chunkView, urlStrings) gErr.Go(func() error { _, err := retriedFetchChunkData( - (*fileId2Url)[chunkView.FileId], + urlStrings, chunkView.CipherKey, chunkView.IsGzipped, chunkView.IsFullChunk(), diff --git a/weed/server/volume_server_handlers_read.go b/weed/server/volume_server_handlers_read.go index 2db46ac9b..981984378 100644 --- a/weed/server/volume_server_handlers_read.go +++ b/weed/server/volume_server_handlers_read.go @@ -27,7 +27,7 @@ var fileNameEscaper = strings.NewReplacer(`\`, `\\`, `"`, `\"`) 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() start := time.Now()