diff options
| author | geekboood <booodpoooq20@gmail.com> | 2022-06-19 16:54:04 +0800 |
|---|---|---|
| committer | geekboood <booodpoooq20@gmail.com> | 2022-06-19 16:54:04 +0800 |
| commit | fdacd94af57a0b9040a396154e7c322bc56dd16e (patch) | |
| tree | c71effb8118ccd9d74f2477ad0bcb53fb9de4782 /weed/filer/filechunks.go | |
| parent | d28f8bb88fcc016a51cfb52caea62fb271720747 (diff) | |
| download | seaweedfs-fdacd94af57a0b9040a396154e7c322bc56dd16e.tar.xz seaweedfs-fdacd94af57a0b9040a396154e7c322bc56dd16e.zip | |
fix: invalid chunk data when failed to read manifests
Diffstat (limited to 'weed/filer/filechunks.go')
| -rw-r--r-- | weed/filer/filechunks.go | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/weed/filer/filechunks.go b/weed/filer/filechunks.go index 208ef8095..48b344bf8 100644 --- a/weed/filer/filechunks.go +++ b/weed/filer/filechunks.go @@ -3,11 +3,12 @@ package filer import ( "bytes" "fmt" - "github.com/chrislusf/seaweedfs/weed/wdclient" - "golang.org/x/exp/slices" "math" "sync" + "github.com/chrislusf/seaweedfs/weed/wdclient" + "golang.org/x/exp/slices" + "github.com/chrislusf/seaweedfs/weed/pb/filer_pb" "github.com/chrislusf/seaweedfs/weed/util" ) @@ -248,6 +249,9 @@ func MergeIntoVisibles(visibles []VisibleInterval, chunk *filer_pb.FileChunk) (n func NonOverlappingVisibleIntervals(lookupFileIdFn wdclient.LookupFileIdFunctionType, chunks []*filer_pb.FileChunk, startOffset int64, stopOffset int64) (visibles []VisibleInterval, err error) { chunks, _, err = ResolveChunkManifest(lookupFileIdFn, chunks, startOffset, stopOffset) + if err != nil { + return + } visibles2 := readResolvedChunks(chunks) |
