googleapis / googleapis/google-cloud-cpp

Expose page token to caller for ListObjects API

Open
#15,233 0 comments 0 reactions 0 assignees View on GitHub
type: feature request
Dominant language
C++
Stars
659
Forks
462
Avg merge
1d 2h
Merged PRs (30d)
89

Description

**What component of `google-cloud-cpp` is this feature request for?**

google/cloud/storage/client.h

**Is your feature request related to a problem? Please describe.**
Currently ListObjects returns an iterator which can be used to go through all the object metadata using single API call. But in case the process that was fetching crashed, I need to resume efficiently right from where it left off for a particular prefix. As in I don't want to start the iterator from the beginning for that prefix. If we can add functionality using page token(as other cloud provider like AWS exposes) to efficiently resume starting from the page where the process crashed, then that will prevent us from re-fetching from beginning.

**Describe the solution you'd like**

Some sort of pagination or efficient seeking mechanism to resume from the process left off.

**Describe alternatives you've considered**

I have not leveraged [startOffset] option but given the object's are listed in lexicographical order of their name, can it be used for efficiently resuming from where the process left off if I pass the last fetched key just before the crash as `startOffset` to a new ListObjects iterator ? Is this seek to the startOffset when passed in the ListObjects API done in O(1)?

**Additional context**

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.