From c03bb180eb5fc96e79324f0aa5ec7cd9b674f901 Mon Sep 17 00:00:00 2001 From: Chris Lu Date: Fri, 14 Aug 2020 00:44:02 -0700 Subject: [PATCH] fix error reporting --- weed/storage/idx/walk.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/weed/storage/idx/walk.go b/weed/storage/idx/walk.go index 44140d142..db3b4cd96 100644 --- a/weed/storage/idx/walk.go +++ b/weed/storage/idx/walk.go @@ -14,6 +14,9 @@ func WalkIndexFile(r io.ReaderAt, fn func(key types.NeedleId, offset types.Offse var readerOffset int64 bytes := make([]byte, types.NeedleMapEntrySize*RowsToRead) count, e := r.ReadAt(bytes, readerOffset) + if count == 0 && e == io.EOF { + return nil + } glog.V(3).Infof("readerOffset %d count %d err: %v", readerOffset, count, e) readerOffset += int64(count) var (