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

Fix cornercase in capping memory allowance #3008

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

rjl493456442
Copy link
Contributor

This pull request addresses a corner case when capping the pebble memory allowance. On a 32-bit machine, the memory usage is capped at MaxInt32 (note that this value is also inclusive), and on a 64-bit machine, it's capped at MaxUint32. These edge values should also be considered valid options.

This pull request addresses a corner case when capping the pebble
memory allowance. On a 32-bit machine, the memory usage is capped
at MaxInt32 (note that this value is also inclusive), and on a
64-bit machine, it's capped at MaxUint32. These edge values should
also be considered valid options.
@cockroach-teamcity
Copy link
Member

This change is Reviewable

@karalabe
Copy link

@jbowens Gentle ping if this is something that would go into the 23.2 release as a fix? We hit an issue in our code when setting the cap to exactly MaxUint32.

Also, the same issue applied to batch sizes. Perhaps that should also be allowed to reach the maxBatchSize constant?

@karalabe
Copy link

Based on the comments for the two constants, it would seem that the max is inclusive as @rjl493456442 said. If it's exclusive, perhaps the comment / naming should be clarified a bit?

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.

None yet

3 participants