Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

List S3 objects in atomic way #157

Closed
daniel-y opened this issue Oct 7, 2023 · 0 comments · Fixed by #161
Closed

List S3 objects in atomic way #157

daniel-y opened this issue Oct 7, 2023 · 0 comments · Fixed by #161
Assignees
Labels

Comments

@daniel-y
Copy link
Contributor

daniel-y commented Oct 7, 2023

CompletableFuture<List<S3StreamObject>> streamObjectsFuture = metadataStore.listStreamObjects(streamId, startOffset, endOffset, limit);
CompletableFuture<List<S3WALObject>> walObjectsFuture = metadataStore.listWALObjects(streamId, startOffset, endOffset, limit);

return CompletableFuture.allOf(streamObjectsFuture, walObjectsFuture)
    .thenApplyAsync(v -> new Pair<>(streamObjectsFuture.join(), walObjectsFuture.join()));

Currently, we need two function calls to achieve a list s3 objects with two types.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants