From 5d01dd28a6c108aa44358fd8d93e2cdfdcd0ef6d Mon Sep 17 00:00:00 2001 From: Chris Lu Date: Thu, 8 Oct 2020 23:38:00 -0700 Subject: [PATCH] add logging --- weed/filer/filechunk_manifest.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/weed/filer/filechunk_manifest.go b/weed/filer/filechunk_manifest.go index 0f84de4cd..8fd12c609 100644 --- a/weed/filer/filechunk_manifest.go +++ b/weed/filer/filechunk_manifest.go @@ -98,7 +98,7 @@ func retriedFetchChunkData(urlStrings []string, cipherKey []byte, isGzipped bool var err error var buffer bytes.Buffer - for waitTime := time.Second; waitTime < 10*time.Minute; waitTime+=waitTime/2 { + for waitTime := time.Second; waitTime < 10*time.Minute; waitTime += waitTime / 2 { for _, urlString := range urlStrings { err = util.ReadUrlAsStream(urlString, cipherKey, isGzipped, isFullChunk, offset, size, func(data []byte) { buffer.Write(data) @@ -110,6 +110,7 @@ func retriedFetchChunkData(urlStrings []string, cipherKey []byte, isGzipped bool break } } + glog.V(0).Infof("sleep for %v before retrying reading", waitTime) time.Sleep(waitTime) }