You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@beam.apache.org by lc...@apache.org on 2017/12/19 20:17:38 UTC

[beam] branch go-sdk updated: BEAM-3361 Increase Go gRPC message size

This is an automated email from the ASF dual-hosted git repository.

lcwik pushed a commit to branch go-sdk
in repository https://gitbox.apache.org/repos/asf/beam.git


The following commit(s) were added to refs/heads/go-sdk by this push:
     new 610db85  BEAM-3361 Increase Go gRPC message size
610db85 is described below

commit 610db859d4090120e1d0110e42d046d63dd90e9b
Author: Bill Neubauer <wc...@google.com>
AuthorDate: Mon Dec 18 12:07:08 2017 -0800

    BEAM-3361 Increase Go gRPC message size
    
    Increases the buffer for gRPC messages from 4M to 50M.
---
 sdks/go/pkg/beam/core/runtime/harness/harness.go | 3 ++-
 sdks/go/pkg/beam/util/grpcx/dial.go              | 3 ++-
 2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/sdks/go/pkg/beam/core/runtime/harness/harness.go b/sdks/go/pkg/beam/core/runtime/harness/harness.go
index 76d516f..59df857 100644
--- a/sdks/go/pkg/beam/core/runtime/harness/harness.go
+++ b/sdks/go/pkg/beam/core/runtime/harness/harness.go
@@ -243,7 +243,8 @@ func fail(id, format string, args ...interface{}) *fnpb.InstructionResponse {
 func dial(ctx context.Context, endpoint string, timeout time.Duration) (*grpc.ClientConn, error) {
 	log.Infof(ctx, "Connecting via grpc @ %s ...", endpoint)
 
-	opts := []grpc.DialOption{grpc.WithInsecure(), grpc.WithBlock()}
+	opts := []grpc.DialOption{grpc.WithInsecure(), grpc.WithBlock(),
+		grpc.WithDefaultCallOptions(grpc.MaxCallRecvMsgSize(50 << 20))}
 
 	// TODO(wcn): Update this code to not use deprecated grpc.WithTimeout
 	if timeout > 0 {
diff --git a/sdks/go/pkg/beam/util/grpcx/dial.go b/sdks/go/pkg/beam/util/grpcx/dial.go
index 8467ace..d0dd1f7 100644
--- a/sdks/go/pkg/beam/util/grpcx/dial.go
+++ b/sdks/go/pkg/beam/util/grpcx/dial.go
@@ -29,7 +29,8 @@ func Dial(ctx context.Context, endpoint string, timeout time.Duration) (*grpc.Cl
 	ctx, cancel := context.WithTimeout(ctx, timeout)
 	defer cancel()
 
-	cc, err := grpc.DialContext(ctx, endpoint, grpc.WithInsecure(), grpc.WithBlock())
+	cc, err := grpc.DialContext(ctx, endpoint, grpc.WithInsecure(), grpc.WithBlock(),
+		grpc.WithDefaultCallOptions(grpc.MaxCallRecvMsgSize(50<<20)))
 	if err != nil {
 		return nil, fmt.Errorf("failed to dial server at %v: %v", endpoint, err)
 	}

-- 
To stop receiving notification emails like this one, please contact
['"commits@beam.apache.org" <co...@beam.apache.org>'].