-
Notifications
You must be signed in to change notification settings - Fork 3.9k
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
Support configuring a deeper recursion limit for protobuf deserialization #9643
Comments
This is discussed in grpc/grpc-dotnet#1983 and you can see some options there. |
The Marshaller change would be fairly small, with some API to configure the max recursion limit and set it at the same time we're setting the message limit: grpc-java/protobuf-lite/src/main/java/io/grpc/protobuf/lite/ProtoLiteUtils.java Lines 210 to 212 in 38311e8
You'd use Server-side is more annoying, and requires repackaging ServerServiceDefinition. |
Yeah anything that is feasible to do without changes to grpc-java would be helpful! |
@ejona86 is there anything I could do to help here? I'm happy to have a try at implementing something as well, if it's accessible enough to someone new to the codebase. |
@timarmstrong, yeah, you could contribute the needed changes. You'd need a new API like It is a small amount of plumbing.
|
Hi @ejona86. I took a shoot at resolving this issue by following your suggestion above. Would appreciate your feedback. |
Thank you!
…On Tue, 2 May 2023 at 14:52, Eric Anderson ***@***.***> wrote:
Closed #9643 <#9643> as completed
via #10094 <#10094>.
—
Reply to this email directly, view it on GitHub
<#9643 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAI2HKYZMNH3R7SXWRPRAWDXEF62HANCNFSM6AAAAAARKU44IY>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Is your feature request related to a problem?
We have a system that uses a recursive protobuf structure to represent some internal data structures.
We want to use GRPC-Java in some more places, but have run into cases where we hit the current recursion limit:
In the current version of the system, which directly deserializes the protobufs instead of going via GRPC, we set a different recursion limit (say 256) based on stress testing. We know other parts of the system can handle more than 100-deep recursion.
Describe the solution you'd like
We'd like to be able to set CodedInputStream.setRecursionLimit() for a GRPC service. It probably works fine for us if it's at the scope of a server too.
Describe alternatives you've considered
Additional context
I saw grpc/grpc#8256 and this is basically a duplicate of that, I hope additional context on the use case is helpful.
I'm also open to trying to implement this if there is a chance that the project will accept it.
The text was updated successfully, but these errors were encountered: