Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

raise maxCallRecvMsgSize to be able to list 10k files #1825

Merged
merged 1 commit into from
Jun 25, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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