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

sql/row: limit row converter batches to 4MB #78945

Merged
merged 1 commit into from
Mar 29, 2022

Conversation

dt
Copy link
Member

@dt dt commented Mar 29, 2022

These small batches are used to reduce channel overhead when passing KVs
to the IMPORT ingest process, where we actually has move sophisticated
memory monitoring in place around the big buffers. They are expected to
be small and ephemeral, but for tables with very large rows, 5k KVs can
actually become a non-trivial amount of used memory. This adds a second limit
that triggers a flush if >4MB of key/value slice cap has been added to the
batch.

Release note: none.

These small batches are used to reduce channel overhead when passing KVs
to the IMPORT ingest process, where we actually has move sophisticated
memory monitoring in place around the big buffers. They are expected to
be small and ephemeral, but for tables with very large rows, 5k KVs can
actually become a non-trivial amount of used memory. This adds a second limit
that triggers a flush if >4MB of key/value slice cap has been added to the
batch.

Release note: none.
@dt dt requested review from adityamaru and msbutler March 29, 2022 12:41
@cockroach-teamcity
Copy link
Member

This change is Reviewable

@dt
Copy link
Member Author

dt commented Mar 29, 2022

TFTR!

bors r+

@craig
Copy link
Contributor

craig bot commented Mar 29, 2022

Build succeeded:

@craig craig bot merged commit b9ea426 into cockroachdb:master Mar 29, 2022
@dt dt deleted the conv-batch-size branch March 29, 2022 15:03
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