Skip to content

Commit

Permalink
bigtable: Use connection pool by default for data client.
Browse files Browse the repository at this point in the history
This makes it less likely that users will be throttled with low qps,
and more likely that a retry will go to a different connection which helps if
a particular connection is having issues. Pool size can still be overridden.

Change-Id: I975e6bfcaedfccf5f9e3b72dd9d3d36f05be963d
Reviewed-on: https://code-review.googlesource.com/8930
Reviewed-by: Jonathan Amsterdam <[email protected]>
  • Loading branch information
garye committed Oct 28, 2016
1 parent 2fa7e44 commit 28994ff
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions bigtable/bigtable.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,8 @@ func NewClient(ctx context.Context, project, instance string, opts ...option.Cli
if err != nil {
return nil, err
}
// Default to a small connection pool that can be overridden.
o = append(o, option.WithGRPCConnectionPool(4))
o = append(o, opts...)
conn, err := transport.DialGRPC(ctx, o...)
if err != nil {
Expand Down

0 comments on commit 28994ff

Please sign in to comment.