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

change the size variable to long #10034

Closed
1zg12 opened this issue May 24, 2022 · 1 comment
Closed

change the size variable to long #10034

1zg12 opened this issue May 24, 2022 · 1 comment

Comments

@1zg12
Copy link

1zg12 commented May 24, 2022

What language does this apply to?
If it's a proto syntax change, is it for proto2 or proto3?
proto3

If it's about generated code change, what programming language?
java

Describe the problem you are trying to solve.
With the size variable being int, it actually would make the protobuf basically not work with large data set (>2GB).
For example, the getSerializedSize would give a wrong estimate of the message size. However, without a proper identification of the message size, it becomes very difficult to tell how to handle the message (for example, maybe split the large data set).

Describe the solution you'd like

Describe alternatives you've considered

Additional context
Add any other context or screenshots about the feature request here.

#8075
#10033

@elharo
Copy link
Contributor

elharo commented May 24, 2022

Protobuf basically doesn't work with messages larger than 2 GB. I strongly recommend you not put more than a few megabytes into each message. Proto is very much not optimized or designed for large messages.

I wish this had been explicitly planned for and either supported or forbidden when proto2 was created, but it wasn't so that's the situation we're in today and it's unlikely to change.

@elharo elharo closed this as completed May 24, 2022
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

No branches or pull requests

2 participants