Skip to content

Commit

Permalink
raise maxCallRecvMsgSize to be able to list 10k files (#1825)
Browse files Browse the repository at this point in the history
Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>
  • Loading branch information
butonic authored Jun 25, 2021
1 parent df52c78 commit e758579
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
5 changes: 5 additions & 0 deletions changelog/unreleased/raise-max-msg-size.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Bugfix: Raise max grpc message size

As a workaround for listing larger folder we raised the `MaxCallRecvMsgSize` to 10MB. This should be enough for ~15k files. The proper fix is implementing ListContainerStream in the gateway, but we needed a way to test the web ui with larger collections.

https://github.com/cs3org/reva/pull/1825
10 changes: 9 additions & 1 deletion pkg/rgrpc/todo/pool/pool.go
Original file line number Diff line number Diff line change
Expand Up @@ -76,13 +76,21 @@ var (
userProviders = newProvider()
groupProviders = newProvider()
dataTxs = newProvider()
maxCallRecvMsgSize = 10240000
)

// NewConn creates a new connection to a grpc server
// with open census tracing support.
// TODO(labkode): make grpc tls configurable.
// TODO make maxCallRecvMsgSize configurable, raised from the default 4MB to be able to list 10k files
func NewConn(endpoint string) (*grpc.ClientConn, error) {
conn, err := grpc.Dial(endpoint, grpc.WithInsecure(), grpc.WithStatsHandler(&ocgrpc.ClientHandler{}))
conn, err := grpc.Dial(
endpoint,
grpc.WithInsecure(),
grpc.WithStatsHandler(&ocgrpc.ClientHandler{}),
grpc.WithDefaultCallOptions(
grpc.MaxCallRecvMsgSize(maxCallRecvMsgSize),
))
if err != nil {
return nil, err
}
Expand Down

0 comments on commit e758579

Please sign in to comment.