sorting chunks

This commit is contained in:
Chris Lu
2020-08-23 00:00:36 -07:00
parent 5e6b714836
commit d60bcbf08a
3 changed files with 10 additions and 2 deletions

View File

@@ -258,7 +258,7 @@ func (file *File) maybeLoadEntry(ctx context.Context) error {
func (file *File) addChunks(chunks []*filer_pb.FileChunk) {
sort.Slice(chunks, func(i, j int) bool {
return chunks[i].Mtime < chunks[j].Mtime
return chunks[i].Fid.FileKey < chunks[j].Fid.FileKey
})
var newVisibles []filer2.VisibleInterval