diff --git a/satellite/metainfo/config.go b/satellite/metainfo/config.go index 7b8b8029a..fe62fb0f7 100644 --- a/satellite/metainfo/config.go +++ b/satellite/metainfo/config.go @@ -205,6 +205,8 @@ type MetabaseDB interface { GetLatestObjectLastSegment(ctx context.Context, opts metabase.GetLatestObjectLastSegment) (segment metabase.Segment, err error) // ListSegments lists specified stream segments. ListSegments(ctx context.Context, opts metabase.ListSegments) (result metabase.ListSegmentsResult, err error) + // ListStreamPositions lists specified stream segment positions. + ListStreamPositions(ctx context.Context, opts metabase.ListStreamPositions) (result metabase.ListStreamPositionsResult, err error) // IterateObjectsAllVersions iterates through all versions of all objects. IterateObjectsAllVersions(ctx context.Context, opts metabase.IterateObjects, fn func(context.Context, metabase.ObjectsIterator) error) (err error) // IterateObjectsAllVersionsWithStatus iterates through all versions of all objects with specified status. diff --git a/satellite/metainfo/metainfo.go b/satellite/metainfo/metainfo.go index c6fa82a5a..5f45a8363 100644 --- a/satellite/metainfo/metainfo.go +++ b/satellite/metainfo/metainfo.go @@ -1694,7 +1694,7 @@ func (endpoint *Endpoint) ListSegments(ctx context.Context, req *pb.SegmentListR return nil, rpcstatus.Error(rpcstatus.Internal, err.Error()) } - result, err := endpoint.metainfo.metabaseDB.ListSegments(ctx, metabase.ListSegments{ + result, err := endpoint.metainfo.metabaseDB.ListStreamPositions(ctx, metabase.ListStreamPositions{ StreamID: id, Cursor: metabase.SegmentPosition{ Part: uint32(cursor.PartNumber),