diff options
Diffstat (limited to 'weed/filer/filechunks.go')
| -rw-r--r-- | weed/filer/filechunks.go | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/weed/filer/filechunks.go b/weed/filer/filechunks.go index 4c732ddcd..00f4c2921 100644 --- a/weed/filer/filechunks.go +++ b/weed/filer/filechunks.go @@ -3,12 +3,12 @@ package filer import ( "bytes" "fmt" - "github.com/chrislusf/seaweedfs/weed/wdclient" + "github.com/seaweedfs/seaweedfs/weed/wdclient" "golang.org/x/exp/slices" "math" - "github.com/chrislusf/seaweedfs/weed/pb/filer_pb" - "github.com/chrislusf/seaweedfs/weed/util" + "github.com/seaweedfs/seaweedfs/weed/pb/filer_pb" + "github.com/seaweedfs/seaweedfs/weed/util" ) func TotalSize(chunks []*filer_pb.FileChunk) (size uint64) { @@ -114,9 +114,12 @@ func DoMinusChunksBySourceFileId(as, bs []*filer_pb.FileChunk) (delta []*filer_p fileIds := make(map[string]bool) for _, interval := range bs { fileIds[interval.GetFileIdString()] = true + fileIds[interval.GetSourceFileId()] = true } for _, chunk := range as { - if _, found := fileIds[chunk.GetSourceFileId()]; !found { + _, sourceFileIdFound := fileIds[chunk.GetSourceFileId()] + _, fileIdFound := fileIds[chunk.GetFileId()] + if !sourceFileIdFound && !fileIdFound { delta = append(delta, chunk) } } |
