[coordinator] restrict batch size#87
Conversation
There was a problem hiding this comment.
Pull Request Overview
This PR implements batch size restriction to handle gRPC resource exhausted errors when communicating with verifier and vcservice. The changes add message size limits to gRPC connections and implement batch splitting logic to prevent oversized messages.
Key changes:
- Added gRPC message size limits to prevent resource exhausted errors
- Implemented batch splitting logic for both signature verifier and validator-committer services
- Enhanced test coverage with large message size scenarios
Reviewed Changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| utils/connection/server_util.go | Added max send/receive message size options to gRPC server |
| utils/connection/client_util.go | Added maxMsgSize constant with TODO for common configuration |
| service/coordinator/signature_verifier_manager.go | Implemented batch splitting logic for signature verifier service |
| service/coordinator/validator_committer_manager.go | Implemented batch splitting logic for validator-committer service |
| service/coordinator/signature_verifier_manager_test.go | Added test for large message handling and updated test helper functions |
| service/coordinator/validator_committer_manager_test.go | Added test for large message handling and updated test helper functions |
Comments suppressed due to low confidence (1)
service/coordinator/signature_verifier_manager_test.go:249
- This line appears to be unrelated to the test's purpose of validating all invalid transactions. It submits and validates a batch of 1 transaction before testing the invalid transactions scenario.
env.requireTxBatch(t, env.submitTxBatch(t, 1))
f40974e to
7a05151
Compare
liran-funaro
left a comment
There was a problem hiding this comment.
LGTM. Just some minor comments.
7683a34 to
52c25de
Compare
liran-funaro
left a comment
There was a problem hiding this comment.
Please see comments
| "retryableStatusCodes": []string{ | ||
| "UNAVAILABLE", | ||
| "DEADLINE_EXCEEDED", | ||
| "RESOURCE_EXHAUSTED", |
There was a problem hiding this comment.
Can RESOURCE_EXHAUSTED be a temporary problem? If so, shouldn't we retry.
I understand that in the case this PR is solving, the error is permanent. But I'm not sure it is always the case for this error.
There was a problem hiding this comment.
I will revert this change for now. We can investigate more and make changes to this code later.
This commit restrict the batch size sent to verifier and vcservice when it receives resource exhausted status code on grpc. Signed-off-by: Senthil Nathan N <cendhu@gmail.com> Signed-off-by: senthil <cendhu@gmail.com>
Signed-off-by: senthil <cendhu@gmail.com>
52c25de to
4808bfb
Compare
Signed-off-by: senthil <cendhu@gmail.com>
4808bfb to
81241ba
Compare
Type of change
Description
This commit restrict the batch size sent to verifier and vcservice when it receives resource exhausted status code on grpc.
Related issues