googleapis / googleapis/google-cloud-cpp

Expose page token to caller for ListObjects API

Ouverte
#15,233 0 commentaires 0 réactions 0 personnes assignées Voir sur GitHub
type: feature request
Langage dominant
C++
Étoiles
659
Forks
463
Merge moyen
1 j 2 h
PR mergées (30 j)
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**

Guide de contribution

Ouvrir le guide de contribution

Piste de recherche

Commencez dans google/cloud/storage/client.h, au niveau de ListObjects, et comparez son itérateur avec l’option startOffset existante décrite dans l’issue. Clarifiez le contrat de pagination et de reprise côté appelant, notamment pour déterminer si startOffset fournit le comportement nécessaire, et définissez la finalisation comme un moyen fiable de poursuivre l’énumération après un crash.

Rédigé par le modèle d'indexation à partir du texte de l'issue.

Évaluation

Stack technique
cpp
Domaine
api, cloud
Type d'issue
Fonctionnalité
Difficulté
5/5
Temps estimé
Plus d'une semaine
Activité
À l'abandon
Clarté
À clarifier
Accessibilité débutants
30/100

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.