This reverts commit 2e5aa06026, reversing
changes made to 4d414f54a2.
This commit is contained in:
chrislu
2023-09-18 16:12:50 -07:00
parent 2e5aa06026
commit 8cb42c39ad
26 changed files with 123 additions and 235 deletions

View File

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