Never expect the replica iterators to be sorted (#538)

This commit is contained in:
Toni Spets
2023-12-18 13:27:50 +02:00
committed by GitHub
parent 1af88c4052
commit 0a7f6e9345
5 changed files with 13 additions and 17 deletions

View File

@@ -8,7 +8,6 @@ import (
"net"
"os"
"path"
"sort"
"sync"
"time"
@@ -141,8 +140,6 @@ func (c *ReplicaClient) Generations(ctx context.Context) (_ []string, err error)
generations = append(generations, name)
}
sort.Strings(generations)
return generations, nil
}
@@ -229,8 +226,6 @@ func (c *ReplicaClient) Snapshots(ctx context.Context, generation string) (_ lit
})
}
sort.Sort(litestream.SnapshotInfoSlice(infos))
return litestream.NewSnapshotInfoSliceIterator(infos), nil
}
@@ -363,8 +358,6 @@ func (c *ReplicaClient) WALSegments(ctx context.Context, generation string) (_ l
})
}
sort.Sort(litestream.WALSegmentInfoSlice(infos))
return litestream.NewWALSegmentInfoSliceIterator(infos), nil
}