Skip to content

Commit

Permalink
Fix ListSnapshotCheckpoint (#15582)
Browse files Browse the repository at this point in the history
Fix ListSnapshotCheckpoint

Approved by: @XuPeng-SH
  • Loading branch information
LeftHandCold authored Apr 17, 2024
1 parent c18e4b9 commit 2fef14c
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions pkg/vm/engine/tae/db/checkpoint/snapshot.go
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,9 @@ func ListSnapshotCheckpoint(
bat.AddVector(colNames[i], vec)
}
entries, maxGlobalEnd := replayCheckpointEntries(bat, 3)
sort.Slice(entries, func(i, j int) bool {
return entries[i].end.Less(&entries[j].end)
})
for i := range entries {
if entries[i].end.Equal(&maxGlobalEnd) && entries[i].entryType == ET_Global {
return entries[i:], nil
Expand Down

0 comments on commit 2fef14c

Please sign in to comment.