aboutsummaryrefslogtreecommitdiff
path: root/weed/filer/filechunks.go
diff options
context:
space:
mode:
authorChris Lu <chris.lu@gmail.com>2020-09-09 11:21:23 -0700
committerChris Lu <chris.lu@gmail.com>2020-09-09 11:21:23 -0700
commit387ab6796f274151f802ccdab8756b959b5fb1cb (patch)
treea3b95f5bdba66f12c609b5e53b262b011a47a450 /weed/filer/filechunks.go
parent4fc0bd1a8173e284ff919edb5214f5adf7a90f06 (diff)
downloadseaweedfs-387ab6796f274151f802ccdab8756b959b5fb1cb.tar.xz
seaweedfs-387ab6796f274151f802ccdab8756b959b5fb1cb.zip
filer: cross cluster synchronization
Diffstat (limited to 'weed/filer/filechunks.go')
-rw-r--r--weed/filer/filechunks.go5
1 files changed, 5 insertions, 0 deletions
diff --git a/weed/filer/filechunks.go b/weed/filer/filechunks.go
index c45963193..db55eec00 100644
--- a/weed/filer/filechunks.go
+++ b/weed/filer/filechunks.go
@@ -226,6 +226,11 @@ func NonOverlappingVisibleIntervals(lookupFileIdFn LookupFileIdFunctionType, chu
sort.Slice(chunks, func(i, j int) bool {
if chunks[i].Mtime == chunks[j].Mtime {
+ filer_pb.EnsureFid(chunks[i])
+ filer_pb.EnsureFid(chunks[j])
+ if chunks[i].Fid == nil || chunks[j].Fid == nil {
+ return true
+ }
return chunks[i].Fid.FileKey < chunks[j].Fid.FileKey
}
return chunks[i].Mtime < chunks[j].Mtime // keep this to make tests run