This is an automated email from the ASF dual-hosted git repository.
hanahmily pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/skywalking-banyandb.git
The following commit(s) were added to refs/heads/main by this push:
new 2b9e02de Fix start time sorting in loadSegments (#946)
2b9e02de is described below
commit 2b9e02dea2bef52eccea5b62bf82192b093b7774
Author: Huang Youliang <[email protected]>
AuthorDate: Mon Jan 19 11:10:05 2026 +0800
Fix start time sorting in loadSegments (#946)
Co-authored-by: Gao Hongtao <[email protected]>
---
banyand/internal/storage/segment.go | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/banyand/internal/storage/segment.go
b/banyand/internal/storage/segment.go
index b0609049..08408aca 100644
--- a/banyand/internal/storage/segment.go
+++ b/banyand/internal/storage/segment.go
@@ -708,7 +708,7 @@ func loadSegments[T TSTable, O any](root, prefix string,
parser *segmentControll
}); err != nil {
return err
}
- sort.Slice(startTimeLst, func(i, j int) bool { return i < j })
+ sort.Slice(startTimeLst, func(i, j int) bool { return
startTimeLst[i].Before(startTimeLst[j]) })
for i, start := range startTimeLst {
var end time.Time
if i < len(startTimeLst)-1 {