Skip to content

Commit

Permalink
Increase message size
Browse files Browse the repository at this point in the history
  • Loading branch information
aminst committed Feb 27, 2024
1 parent 8000560 commit f9a9c26
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 1 deletion.
1 change: 1 addition & 0 deletions pkg/client/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -195,6 +195,7 @@ func StartRouterRPCClients(endpoints []config.RouterEndpoint) (RouterClients, er
conn, err := grpc.Dial(serverAddr,
grpc.WithTransportCredentials(insecure.NewCredentials()),
grpc.WithUnaryInterceptor(rpc.ContextPropagationUnaryClientInterceptor()),
grpc.WithDefaultCallOptions(grpc.MaxCallRecvMsgSize(math.MaxInt64), grpc.MaxCallSendMsgSize(math.MaxInt64)),
)
if err != nil {
return nil, err
Expand Down
3 changes: 2 additions & 1 deletion pkg/oramnode/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ package oramnode
import (
"context"
"fmt"
"math"
"math/rand"

shardnodepb "github.com/dsg-uwaterloo/oblishard/api/shardnode"
Expand Down Expand Up @@ -100,7 +101,7 @@ func StartShardNodeRPCClients(endpoints []config.ShardNodeEndpoint) (map[int]Rep
for _, endpoint := range endpoints {
serverAddr := fmt.Sprintf("%s:%d", endpoint.IP, endpoint.Port)
log.Debug().Msgf("Starting ShardNode RPC client for endpoint: %s", serverAddr)
conn, err := grpc.Dial(serverAddr, grpc.WithTransportCredentials(insecure.NewCredentials()))
conn, err := grpc.Dial(serverAddr, grpc.WithTransportCredentials(insecure.NewCredentials()), grpc.WithDefaultCallOptions(grpc.MaxCallRecvMsgSize(math.MaxInt64), grpc.MaxCallSendMsgSize(math.MaxInt64)))
if err != nil {
return nil, err
}
Expand Down
2 changes: 2 additions & 0 deletions pkg/router/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package router

import (
"fmt"
"math"

shardnodepb "github.com/dsg-uwaterloo/oblishard/api/shardnode"
"github.com/dsg-uwaterloo/oblishard/pkg/config"
Expand All @@ -27,6 +28,7 @@ func StartShardNodeRPCClients(endpoints []config.ShardNodeEndpoint) (map[int]Rep
conn, err := grpc.Dial(serverAddr,
grpc.WithTransportCredentials(insecure.NewCredentials()),
grpc.WithUnaryInterceptor(rpc.ContextPropagationUnaryClientInterceptor()),
grpc.WithDefaultCallOptions(grpc.MaxCallRecvMsgSize(math.MaxInt64), grpc.MaxCallSendMsgSize(math.MaxInt64)),
)
if err != nil {
return nil, err
Expand Down

0 comments on commit f9a9c26

Please sign in to comment.