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

@@ -6,7 +6,6 @@ import (
"io"
"os"
"path/filepath"
"sort"
"github.com/benbjohnson/litestream"
"github.com/benbjohnson/litestream/internal"
@@ -180,8 +179,6 @@ func (c *ReplicaClient) Snapshots(ctx context.Context, generation string) (lites
})
}
sort.Sort(litestream.SnapshotInfoSlice(infos))
return litestream.NewSnapshotInfoSliceIterator(infos), nil
}
@@ -297,8 +294,6 @@ func (c *ReplicaClient) WALSegments(ctx context.Context, generation string) (lit
})
}
sort.Sort(litestream.WALSegmentInfoSlice(infos))
return litestream.NewWALSegmentInfoSliceIterator(infos), nil
}