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:
Kaloyan Raev 2020-11-24 11:50:02 +02:00
parent efaba85c73
commit 67c210a64c

View File

@ -977,7 +977,10 @@ func (endpoint *Endpoint) ListObjects(ctx context.Context, req *pb.ObjectListReq
ProjectID: keyInfo.ProjectID, ProjectID: keyInfo.ProjectID,
BucketName: string(req.Bucket), BucketName: string(req.Bucket),
Prefix: prefix, Prefix: prefix,
Cursor: metabase.IterateCursor{Key: metabase.ObjectKey(req.EncryptedCursor)}, 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, Recursive: req.Recursive,
BatchSize: limit + 1, BatchSize: limit + 1,
Status: status, Status: status,