Skip to content

Commit 953bd11

Browse files
authored
[BUG] Restore increase max payload size of log service (Go) (#4546)
## Description of changes This restores the core functionality we were hoping to add in #4534 which is increasing the gRPC payload size. Instead of using the methods from the `grpcutils` package, this just sets the option in the existing setup so that we hopefully don't break whatever voodoo is keeping metrics collection working. - Improvements & Bug fixes - See #4534 - New functionality - See #4534 ## Test plan I ran `make test` locally, the build succeeds, but our local tests are broken for some reason. Relying on CI so that I don't have to debug yet another orthogonal issue.
1 parent b17dfbd commit 953bd11

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

go/cmd/logservice/main.go

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,11 @@ import (
2525
healthgrpc "google.golang.org/grpc/health/grpc_health_v1"
2626
)
2727

28+
// hard-coding this here despite it also being in pkg/grpcutils/service.go because
29+
// using the methods from grpcutils results in breaking our metrics collection for
30+
// some reason. This service is being deprecated soon, so this is just a quick fix.
31+
const maxGrpcFrameSize = 256 * 1024 * 1024
32+
2833
func main() {
2934
ctx := context.Background()
3035

@@ -55,7 +60,10 @@ func main() {
5560
if err != nil {
5661
log.Fatal("failed to listen", zap.Error(err))
5762
}
58-
s := grpc.NewServer(grpc.UnaryInterceptor(sharedOtel.ServerGrpcInterceptor))
63+
s := grpc.NewServer(
64+
grpc.MaxRecvMsgSize(maxGrpcFrameSize),
65+
grpc.UnaryInterceptor(sharedOtel.ServerGrpcInterceptor),
66+
)
5967
healthcheck := health.NewServer()
6068
healthgrpc.RegisterHealthServer(s, healthcheck)
6169

0 commit comments

Comments
 (0)