[ 
https://issues.apache.org/jira/browse/BEAM-3361?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16297367#comment-16297367
 ] 

ASF GitHub Bot commented on BEAM-3361:
--------------------------------------

lukecwik closed pull request #4285: BEAM-3361 Increase Go gRPC message size
URL: https://github.com/apache/beam/pull/4285
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/sdks/go/pkg/beam/core/runtime/harness/harness.go 
b/sdks/go/pkg/beam/core/runtime/harness/harness.go
index 76d516fba02..59df85734fc 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 8467ace1ba4..d0dd1f7dc75 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)
        }


 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


> Go SDK needs to increase gRPC receive buffer size
> -------------------------------------------------
>
>                 Key: BEAM-3361
>                 URL: https://issues.apache.org/jira/browse/BEAM-3361
>             Project: Beam
>          Issue Type: Bug
>          Components: sdk-go
>            Reporter: Bill Neubauer
>            Assignee: Bill Neubauer
>            Priority: Minor
>   Original Estimate: 1h
>  Remaining Estimate: 1h
>
> The Java gRPC server allows for sending messages larger than the default 4M 
> gRPC limit. The Go SDK needs to handle these messages. I propose increasing 
> the limit to 50M based on empirical observations, and we can tune this value 
> in the future if needed.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Reply via email to