Browse Source

add logging

pull/1377/head
Chris Lu 5 years ago
parent
commit
62260e526b
  1. 3
      weed/filer2/reader_at.go

3
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)]

Loading…
Cancel
Save