Skip to content

[BUG] AwsObjectStorage#doList only list first 1000 object #2650

Open
@superhx

Description

@superhx

AutoMQ Version

all

Operating System

all

Installation Method

source

Hardware Configuration

No response

Other Relevant Software

No response

What Went Wrong?

The #doList should support list more than 1000 object by prefix.

CompletableFuture<List<ObjectInfo>> doList(String prefix) {
return readS3Client.listObjectsV2(builder -> builder.bucket(bucket).prefix(prefix))
.thenApply(resp ->
resp.contents()
.stream()
.map(object -> new ObjectInfo(bucketURI.bucketId(), object.key(), object.lastModified().toEpochMilli(), object.size()))
.collect(Collectors.toList()));
}

What Should Have Happened Instead?

Steps to Reproduce

Additional Information

No response

Metadata

Metadata

Assignees

Labels

bugSomething isn't workinggood first issueGood for newcomers

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions