-
Notifications
You must be signed in to change notification settings - Fork 92
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
Question about max byte slice #341
Comments
This is a bug in |
I know this was recently fixed, but I got very curious about this statement. To my understanding, 1024*1024 is equal to 1 MiB. The PR fixing this replaced fmt.Println(1024*1024 == 1_048_576)
// Output: true So, I can't wrap my head around what was fixed by it 🙈. |
@hhromic Yes, indeed equal. I understood it wrong and persuaded others. |
My apologies, gentlemen. |
Ah, peace of mind restored! 😄. |
No harm no foul. i could have scrutinised this more, but didn't. |
Hi, I see the following comment (https://github.com/hamba/avro/blob/main/config.go#L49C10-L49C10)
And the function here (https://github.com/hamba/avro/blob/main/config.go#L49C10-L49C10):
And here we have a constant (https://github.com/hamba/avro/blob/main/config.go#L10C1-L11C37):
const maxByteSliceSize = 1024 * 1024
My question is: 1024*1024 it's not equal to 1 MiB. Is there a typo in the configuration parameter or typo in the
maxByteSliceSize
value? Or there is somewhere multiplication by 1024 before using it?BTW, here (https://github.com/hamba/avro/blob/main/reader.go#L227) I see the usage of the function as is, without any multiplication:
Or
ReadLong
gets the size in kilobytes?Thank you for any explanation.
The text was updated successfully, but these errors were encountered: