Skip to content

Conversation

@andy-kimball
Copy link
Contributor

The comment for MaxBatchSize indicates it limits the max number of entries in KV batches used for mutations. However, it's actually coded to limit the max number of logical SQL rows that are modified in a KV batch. This can be much smaller than the max number of KV entries, depending on the number of indexes on the mutated table.

This commit updates the code to match the comment, limiting the max number of KV entries rather than the number of logical SQL rows. This also makes the code consistent with MaxBatchByteSize, which limits the max number of bytes in KV batches.

Epic: None

Release note: None

The comment for MaxBatchSize indicates it limits the max number of
entries in KV batches used for mutations. However, it's actually coded
to limit the max number of logical SQL rows that are modified in a
KV batch. This can be much smaller than the max number of KV entries,
depending on the number of indexes on the mutated table.

This commit updates the code to match the comment, limiting the max
number of KV entries rather than the number of logical SQL rows. This
also makes the code consistent with MaxBatchByteSize, which limits
the max number of bytes in KV batches.

Epic: None

Release note: None
@andy-kimball andy-kimball requested a review from a team as a code owner October 24, 2025 23:47
@blathers-crl
Copy link

blathers-crl bot commented Oct 24, 2025

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

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.

2 participants