Skip to content

feat(storage): add client feature tracking support#14320

Merged
krishnamd-jkp merged 5 commits intogoogleapis:mainfrom
krishnamd-jkp:multistream-tracking
Apr 13, 2026
Merged

feat(storage): add client feature tracking support#14320
krishnamd-jkp merged 5 commits intogoogleapis:mainfrom
krishnamd-jkp:multistream-tracking

Conversation

@krishnamd-jkp
Copy link
Copy Markdown
Contributor

No description provided.

@krishnamd-jkp krishnamd-jkp requested review from a team as code owners April 1, 2026 10:57
@product-auto-label product-auto-label Bot added the api: storage Issues related to the Cloud Storage API. label Apr 1, 2026
Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces a feature tracking mechanism for the Go storage client, utilizing a bitmask-based header (x-goog-storage-go-features) to monitor usage of specific features like Parallel Composite Uploads (PCU) and Multi-Stream downloads. The implementation includes a new tracker.go utility for managing feature codes in the context and updates to the gRPC client to inject these codes into outgoing request headers. Review feedback suggests several improvements: upgrading the bitmask from uint8 to a larger type for future-proofing, optimizing addFeatureAttributes to avoid redundant context allocations when features are already present, and implementing a precomputed lookup table for base64 encoding to enhance performance on the request hot path.

Comment thread storage/tracker.go Outdated
Comment thread storage/tracker.go Outdated
Comment thread storage/tracker.go Outdated
cpriti-os
cpriti-os previously approved these changes Apr 6, 2026
@cpriti-os cpriti-os self-requested a review April 6, 2026 10:42
@cpriti-os cpriti-os dismissed their stale review April 6, 2026 10:43

not yet reviewed

@krishnamd-jkp krishnamd-jkp force-pushed the multistream-tracking branch from 95a24e2 to 739db44 Compare April 7, 2026 05:31
Comment thread storage/grpc_client.go Outdated
Comment thread storage/grpc_client.go
Comment thread storage/grpc_client.go Outdated
Comment thread storage/tracker.go Outdated
@krishnamd-jkp krishnamd-jkp requested a review from cpriti-os April 7, 2026 08:19
Comment thread storage/grpc_client.go
}
}

// Client level feature tracking.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would be better if this could be moved to a helper, this might even be reused in http.

@krishnamd-jkp krishnamd-jkp merged commit dc245af into googleapis:main Apr 13, 2026
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

api: storage Issues related to the Cloud Storage API.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants