feat(bigtable): support DirectPath in Cloud Bigtable C++ client#16088
feat(bigtable): support DirectPath in Cloud Bigtable C++ client#16088scotthart merged 3 commits intogoogleapis:mainfrom
Conversation
There was a problem hiding this comment.
Code Review
This pull request introduces support for the CBT_ENABLE_DIRECTPATH environment variable, updates the Direct Path endpoint to c2p:///bigtable.googleapis.com, and removes the single-channel restriction for Direct Path. It also adds logic to include specific feature flags in the bigtable-features metadata when Direct Path is active. A critical memory leak was identified in FeaturesMetadata() because the static keyword was removed from a heap-allocated variable; this should be corrected by restoring the static qualifier and moving the environment check inside the initialization lambda.
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #16088 +/- ##
==========================================
- Coverage 92.70% 92.70% -0.01%
==========================================
Files 2353 2353
Lines 218231 218352 +121
==========================================
+ Hits 202313 202421 +108
- Misses 15918 15931 +13 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Extract DirectPath checking logic into a reusable `IsDirectPath()` function and update option defaults and metadata flags: - Extract environment variable checking logic to `bigtable::internal::IsDirectPath()` - Check both `GOOGLE_CLOUD_ENABLE_DIRECT_PATH` and `CBT_ENABLE_DIRECTPATH` - Set `c2p:///bigtable.googleapis.com` as the endpoint when DirectPath is enabled - Do not limit channel counts to 1 when DirectPath is enabled - Update features metadata in the stub factory to request DirectPath when enabled - Add test coverage for new environment variable checks and feature flags
Extract DirectPath checking logic into a reusable `IsDirectPath()` function and update option defaults and metadata flags: - Extract environment variable checking logic to `bigtable::internal::IsDirectPath()` - Check both `GOOGLE_CLOUD_ENABLE_DIRECT_PATH` and `CBT_ENABLE_DIRECTPATH` - Set `c2p:///bigtable.googleapis.com` as the endpoint when DirectPath is enabled - Do not limit channel counts to 1 when DirectPath is enabled - Update features metadata in the stub factory to request DirectPath when enabled - Add test coverage for new environment variable checks and feature flags
Extract DirectPath checking logic into a reusable `IsDirectPath()` function and update option defaults and metadata flags: - Extract environment variable checking logic to `bigtable::internal::IsDirectPath()` - Check both `GOOGLE_CLOUD_ENABLE_DIRECT_PATH` and `CBT_ENABLE_DIRECTPATH` - Set `c2p:///bigtable.googleapis.com` as the endpoint when DirectPath is enabled - Do not limit channel counts to 1 when DirectPath is enabled - Update features metadata in the stub factory to request DirectPath when enabled - Add test coverage for new environment variable checks and feature flags
Extract DirectPath checking logic into a reusable
IsDirectPath()function and update option defaults and metadata flags:bigtable::internal::IsDirectPath()GOOGLE_CLOUD_ENABLE_DIRECT_PATHandCBT_ENABLE_DIRECTPATHc2p:///bigtable.googleapis.comas the endpoint when DirectPath is enabled