From 62260e526bdc29a1b559bbcae86ee6fde1880eca Mon Sep 17 00:00:00 2001 From: Chris Lu Date: Sat, 27 Jun 2020 12:54:37 -0700 Subject: [PATCH] add logging --- weed/filer2/reader_at.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/weed/filer2/reader_at.go b/weed/filer2/reader_at.go index 0ab456d79..381e76127 100644 --- a/weed/filer2/reader_at.go +++ b/weed/filer2/reader_at.go @@ -129,7 +129,8 @@ func (c *ChunkReadAt) fetchChunkData(chunkView *ChunkView) (data []byte, err err } if int64(len(chunkData)) < chunkView.Offset+int64(chunkView.Size) { - return nil, fmt.Errorf("unexpected larger chunkView [%d,%d) than chunk %d", chunkView.Offset, chunkView.Offset+int64(chunkView.Size), len(chunkData)) + glog.Errorf("unexpected larger cached:%v chunk [%d,%d) than %d", hasDataInCache, chunkView.Offset, chunkView.Offset+int64(chunkView.Size), len(chunkData)) + return nil, fmt.Errorf("unexpected larger cached:%v chunk [%d,%d) than %d", hasDataInCache, chunkView.Offset, chunkView.Offset+int64(chunkView.Size), len(chunkData)) } data = chunkData[chunkView.Offset : chunkView.Offset+int64(chunkView.Size)]