Repository navigation
Add support in Storage RPC level for request with selected fields. #193
Description
Activity
- addedtype: feature request‘Nice-to-have’ improvement, new feature or different behavior or design.‘Nice-to-have’ improvement, new feature or different behavior or design.api: storageIssues related to the Cloud Storage API.Issues related to the Cloud Storage API.
on Sep 30, 2015 I am working on this now. I wanted to provide fields selection for blob
getandlist. My idea was to allow this through a vararg of fields objects/enums. I would also like to encapsulate this in our XXXOption vargargs to avoid having other parameters floating around. This applies quite well tolist:storage.list("bucket", BlobListOption.fields(BlobField,contentType, BlobField.metadata));
For
getwe have insteadBlobSourceOptionthat is used in several points across our API. In such points havingBlobSourceOption.fieldsdoes not always make sense (think of update where selected fields are supported but we also haveBlobTargetOptionthat might be used to specify them).
An alternative could be:storage.get(BlobId, Iterable<BlobField>, BlobSourceOption...);
However, I don't like very much this signature.
Do you have any suggestion?
This issue was about adding the selective fields to the RPC (spi) layer rather than adding it to the API layer (so basically it is pure optimization for some operations such as exists).
Do you really think it would be useful to users? If so, what do you feel about creating a separate
BlobReadOptions(similar to theBlobWriteOptionyou already created) to be used with get operation?I think this issue was fixed, right @mziccard ?
Yes. Closed with #312
- added 7 commits that reference this issue
on Jun 21, 2022 7 remaining items
- added a commit that references this issue
on Aug 9, 2022 - added a commit that references this issue
on Aug 16, 2022 - added a commit that references this issue
on Dec 22, 2025 - added a commit that references this issue
on Jan 6, 2026 - added a commit that references this issue
on Jan 22, 2026 - added a commit that references this issue
on Feb 24, 2026 - added a commit that references this issue
on Mar 11, 2026 - added a commit that references this issue
on Mar 12, 2026 - added a commit that references this issue
on Mar 30, 2026 - added a commit that references this issue
on Apr 1, 2026
This topic was also discussed in #171.
Storage service allows getting partial blob or gcs object data using selected fields.
We could use that for exists checks and for listing calls + lazy load of the metadata when requested in the functional blobs.
This issue is an optimization only. If we think we want to expose the selected fields feature in the user level we should create a separate issue (and discuses how to make sure one does not override metadata
with partial metadata there).