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

colmem: allow Allocator max batch size to be customized #98544

Merged
merged 1 commit into from
Mar 15, 2023

Conversation

cucaroach
Copy link
Contributor

Previously this was hardcoded to coldata.BatchSize or 1024, now it
can be increased or decreased.

Epic: CRDB-18892
Informs: #91831
Release note: None

@blathers-crl
Copy link

blathers-crl bot commented Mar 13, 2023

It looks like your PR touches production code but doesn't add or edit any test code. Did you consider adding tests to your PR?

🦉 Hoot! I am a Blathers, a bot for CockroachDB. My owner is dev-inf.

@cockroach-teamcity
Copy link
Member

This change is Reviewable

@cucaroach cucaroach force-pushed the alloc-set-max branch 3 times, most recently from 201855b to ddc28ec Compare March 14, 2023 14:25
@cucaroach cucaroach marked this pull request as ready for review March 14, 2023 17:41
@cucaroach cucaroach requested a review from a team as a code owner March 14, 2023 17:41
@cucaroach cucaroach requested review from mgartner and yuzefovich and removed request for mgartner March 14, 2023 17:41
Copy link
Member

@yuzefovich yuzefovich left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:lgtm:

Reviewed 1 of 1 files at r1, all commit messages.
Reviewable status: :shipit: complete! 1 of 0 LGTMs obtained (waiting on @cucaroach)


pkg/sql/colmem/allocator.go line 166 at r1 (raw file):

}

// SetMaxBatchSize use this to get more or less than the coldata.BatchSize() default.

nit: the comment needs an update.


pkg/sql/colmem/allocator.go line 232 at r1 (raw file):

// growCapacity grows the capacity exponentially or up to minDesiredCapacity
// (whichever is larger) without exceeding coldata.BatchSize().

nit: s/coldata.BatchSize()/maxBatchSize/g.

Previously this was hardcoded to coldata.BatchSize or 1024, now it
can be increased or decreased.

Epic: CRDB-18892
Informs: cockroachdb#91831
Release note: None
@cucaroach
Copy link
Contributor Author

bors r+
TFTRs!

@craig
Copy link
Contributor

craig bot commented Mar 15, 2023

Build failed (retrying...):

@craig
Copy link
Contributor

craig bot commented Mar 15, 2023

Build succeeded:

@craig craig bot merged commit 1b9ebe1 into cockroachdb:master Mar 15, 2023
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