Skip to content

Fix cornercase in capping memory allowance#3008

Open
rjl493456442 wants to merge 2 commits intocockroachdb:masterfrom
rjl493456442:fix-option
Open

Fix cornercase in capping memory allowance#3008
rjl493456442 wants to merge 2 commits intocockroachdb:masterfrom
rjl493456442:fix-option

Conversation

@rjl493456442
Copy link
Copy Markdown
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
Copy Markdown
Member

This change is Reviewable

@karalabe
Copy link
Copy Markdown

@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
Copy Markdown

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.

3 participants