Skip to content

[BUG] Restore increase max payload size of log service (Go) #4546

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

Merged
merged 1 commit into from
May 14, 2025

Conversation

eculver
Copy link
Contributor

@eculver eculver commented May 14, 2025

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.

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.

@eculver eculver requested review from rescrv, HammadB and codetheweb May 14, 2025 19:18
Copy link

Reviewer Checklist

Please leverage this checklist to ensure your code review is thorough before approving

Testing, Bugs, Errors, Logs, Documentation

  • Can you think of any use case in which the code does not behave as intended? Have they been tested?
  • Can you think of any inputs or external events that could break the code? Is user input validated and safe? Have they been tested?
  • If appropriate, are there adequate property based tests?
  • If appropriate, are there adequate unit tests?
  • Should any logging, debugging, tracing information be added or removed?
  • Are error messages user-friendly?
  • Have all documentation changes needed been made?
  • Have all non-obvious changes been commented?

System Compatibility

  • Are there any potential impacts on other parts of the system or backward compatibility?
  • Does this change intersect with any items on our roadmap, and if so, is there a plan for fitting them together?

Quality

  • Is this code of a unexpectedly high quality (Readability, Modularity, Intuitiveness)

Copy link
Contributor

This PR fixes a bug by reintroducing increased gRPC payload size in the Go log service without using the methods from the grpcutils package. The fix hard-codes the maxGrpcFrameSize constant (256MB) and applies it directly to the gRPC server configuration to maintain metrics collection functionality.

This summary was automatically generated by @propel-code-bot

Comment on lines +28 to +31
// hard-coding this here despite it also being in pkg/grpcutils/service.go because
// using the methods from grpcutils results in breaking our metrics collection for
// some reason. This service is being deprecated soon, so this is just a quick fix.
const maxGrpcFrameSize = 256 * 1024 * 1024
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[BestPractice]

Although the comment explains the reason for hardcoding maxGrpcFrameSize, consider adding a TODO or issue number reference to track the proper fix later. This helps future maintainers understand that this is a temporary solution that should be addressed once the service is refactored.

Comment on lines +64 to +65
grpc.MaxRecvMsgSize(maxGrpcFrameSize),
grpc.UnaryInterceptor(sharedOtel.ServerGrpcInterceptor),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[BestPractice]

Consider adding MaxSendMsgSize similar to MaxRecvMsgSize to ensure symmetrical message size limits for both directions. Without this, the service may be able to receive large messages but fail when trying to send responses of similar size.

@eculver eculver enabled auto-merge (squash) May 14, 2025 23:18
@eculver eculver merged commit 953bd11 into main May 14, 2025
71 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants