Repository navigation
feat(bigtable/accelerator): add proxy channel scaffold owning a sessi… - #20310
Conversation
There was a problem hiding this comment.
Code Review
This pull request introduces the 'accelerator' package, which implements an in-process 'grpc.ClientConnInterface' ('Channel') to translate Bigtable V2 RPCs into session vRPCs. It establishes the basic lifecycle management ('NewChannel', 'Close') and stubbed RPC dispatching, supported by unit tests and mocks. The feedback suggests removing a redundant nil-guard check on 'c.sc' in the 'Close' method, as construction invariants guarantee it will not be nil.
| if c.sc == nil { | ||
| return nil | ||
| } | ||
| return c.sc.Close() |
There was a problem hiding this comment.
According to the project's general rules, we should avoid adding defensive nil-guards on variables where invariants guaranteed by construction ensure they will never be nil. Since c.sc is initialized during NewChannel and is guaranteed to be non-nil if construction succeeds, this nil check is redundant and can be safely removed.
return c.sc.Close()References
- Do not add defensive nil-guards on variables or parameters where invariants guaranteed by construction or call sites ensure they will never be nil. Such guards result in dead code and can mask real bugs by silently no-oping instead of allowing a nil-panic to immediately surface the caller's mistake.
There was a problem hiding this comment.
Probably wrap this with a atomic boolean closed or syncOnce so that Close() can be idempotent.
…on.Client Channel is an in-process grpc.ClientConnInterface scoped to one (project, instance, appProfile) that owns a session.Client for the daemon's lifetime. This layer establishes construction — dialing the session.Client with the standard Bigtable data-plane endpoint, scope, and user agent — and teardown via Close. Invoke and NewStream report Unimplemented until the per-RPC dispatch is layered on top. Change-Id: Id10155661f36c7b198d2e0df95fa7f2f43774adf
🤖 I have created a release *beep* *boop* --- ## [1.53.0](bigtable/v1.52.0...bigtable/v1.53.0) (2026-08-27) ### Features * **bigtable/accelerator:** Add --user-agent flag to daemon ([#20341](#20341)) ([6b33c06](6b33c06)) * **bigtable/accelerator:** Add daemon binary with identity verification ([#20330](#20330)) ([2f9cf89](2f9cf89)) * **bigtable/accelerator:** Add proxy channel scaffold owning a sessi… ([#20310](#20310)) ([d65ca7d](d65ca7d)) * **bigtable/accelerator:** Add stdin-EOF and parent-PID lifecycle wa… ([#20328](#20328)) ([dc1c6ae](dc1c6ae)) * **bigtable/accelerator:** Add UDS server with authenticated proxy i… ([#20320](#20320)) ([a837020](a837020)) * **bigtable/accelerator:** Add V2-to-session request adapters ([#20271](#20271)) ([4cb6f16](4cb6f16)) * **bigtable/accelerator:** Authenticate UDS callers with a stdin tok… ([#20324](#20324)) ([7847ab7](7847ab7)) * **bigtable/accelerator:** Dispatch MutateRow and single-row ReadRow… ([#20312](#20312)) ([c89f336](c89f336)) * Update API sources and regenerate ([#20369](#20369)) ([bfe3aaf](bfe3aaf)) * Update sources and regenerate ([#20399](#20399)) ([a6b5cdb](a6b5cdb)) ### Bug Fixes * **bigtable/internal/transport:** Drop redundant defer p.Close() in AFE picker tests ([#20311](#20311)) ([c05b767](c05b767)) * **bigtable:** Register c2p resolver + RLS balancer for accelerator daemon DirectPath ([#20362](#20362)) ([95f372f](95f372f)) * **bigtable:** Session client — set AllowNonDefaultServiceAccount on DirectPath dial ([#20343](#20343)) ([b9c76ec](b9c76ec)) * **bigtable:** Session client — single ownership + single-flight pool loading ([#20368](#20368)) ([f4ad950](f4ad950)) * **bigtable:** Session pool — re-drive creation after a never-activated close so the consecutive-failure breaker is reachable ([#20355](#20355)) ([ee74949](ee74949)) * **bigtable:** Use composed user agent as CSM client_name ([#20383](#20383)) ([cb02335](cb02335)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com>
…on.Client
Channel is an in-process grpc.ClientConnInterface scoped to one (project, instance, appProfile) that owns a session.Client for the daemon's lifetime. This layer establishes construction — dialing the session.Client with the standard Bigtable data-plane endpoint, scope, and user agent — and teardown via Close. Invoke and NewStream report Unimplemented until the per-RPC dispatch is layered on top.
Change-Id: Id10155661f36c7b198d2e0df95fa7f2f43774adf