mount: better combines connected intervals to write to volume servers

This commit is contained in:
Chris Lu
2020-01-22 23:00:04 -08:00
parent 6a5c037099
commit c2e589f202
4 changed files with 265 additions and 119 deletions

View File

@@ -230,12 +230,6 @@ func (file *File) maybeLoadEntry(ctx context.Context) error {
return nil
}
func (file *File) addChunk(chunk *filer_pb.FileChunk) {
if chunk != nil {
file.addChunks([]*filer_pb.FileChunk{chunk})
}
}
func (file *File) addChunks(chunks []*filer_pb.FileChunk) {
sort.Slice(chunks, func(i, j int) bool {