satellite/metainfo: set list cursor to version 1
Otherwise, if left to default version 0, the iterator will include the cursor item in the result, which fails some tests. Change-Id: I85103a36852477f371ec46c673a82c2e129978b7
This commit is contained in:
parent
efaba85c73
commit
67c210a64c
@ -977,10 +977,13 @@ func (endpoint *Endpoint) ListObjects(ctx context.Context, req *pb.ObjectListReq
|
||||
ProjectID: keyInfo.ProjectID,
|
||||
BucketName: string(req.Bucket),
|
||||
Prefix: prefix,
|
||||
Cursor: metabase.IterateCursor{Key: metabase.ObjectKey(req.EncryptedCursor)},
|
||||
Recursive: req.Recursive,
|
||||
BatchSize: limit + 1,
|
||||
Status: status,
|
||||
Cursor: metabase.IterateCursor{
|
||||
Key: metabase.ObjectKey(req.EncryptedCursor),
|
||||
Version: 1, // TODO: set to a the version from the protobuf request when it supports this
|
||||
},
|
||||
Recursive: req.Recursive,
|
||||
BatchSize: limit + 1,
|
||||
Status: status,
|
||||
}, func(ctx context.Context, it metabase.ObjectsIterator) error {
|
||||
entry := metabase.ObjectEntry{}
|
||||
for len(resp.Items) < limit && it.Next(ctx, &entry) {
|
||||
|
Loading…
Reference in New Issue
Block a user