feat(storage): add client feature tracking support#14320
feat(storage): add client feature tracking support#14320krishnamd-jkp merged 5 commits intogoogleapis:mainfrom
Conversation
There was a problem hiding this comment.
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.
95a24e2 to
739db44
Compare
| } | ||
| } | ||
|
|
||
| // Client level feature tracking. |
There was a problem hiding this comment.
It would be better if this could be moved to a helper, this might even be reused in http.
No description provided.