Revert "Revert "Merge branch 'master' of https://github.com/seaweedfs/seaweedfs""

This reverts commit 8cb42c39
This commit is contained in:
chrislu
2023-09-25 09:35:16 -07:00
parent 3d07895518
commit 645ae8c57b
23 changed files with 84 additions and 70 deletions

View File

@@ -30,14 +30,20 @@ func readResolvedChunks(chunks []*filer_pb.FileChunk, startOffset int64, stopOff
isStart: false,
})
}
slices.SortFunc(points, func(a, b *Point) bool {
slices.SortFunc(points, func(a, b *Point) int {
if a.x != b.x {
return a.x < b.x
return int(a.x - b.x)
}
if a.ts != b.ts {
return a.ts < b.ts
return int(a.ts - b.ts)
}
return !a.isStart
if a.isStart {
return -1
}
if b.isStart {
return 1
}
return 0
})
var prevX int64