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

intentresolver: Add byte pagination to RequestBatcher and IntentResolver #1

Conversation

KaiSun314
Copy link
Owner

Fixes: cockroachdb#77228

Intent resolution batches are sequenced on raft and each batch can consist of 100-200 intents. If an intent key or even value in some cases are large, it is possible that resolving all intents in the batch would result in a raft command size exceeding the max raft command size kv.raft.command.max_size.

In PR cockroachdb#91976, we added support for TargetBytes for resolve intent and resolve intent range raft commands.

In this PR, we set the TargetBytes field in the resolve intent and resolve intent range requests in the RequestBatcher and IntentResolver to half the max raft command size: kv.raft.command.max_size / 2. This allows us to stop resolving intents in the batch as soon as we get close to the max raft command size to lower the chance we exceed this limit.

Release note (ops change): Added support for a byte limit on resolve intent and resolve intent range raft commands to prevent such commands from exceeding the max raft command size.

@KaiSun314 KaiSun314 force-pushed the mvcc-byte-size-pagination branch from fd08dfa to 8ee923b Compare November 21, 2022 16:30
Intent resolution batches are sequenced on raft and each batch can
consist of 100-200 intents. If an intent key or even value in some cases
are large, it is possible that resolving all intents in the batch would
result in a raft command size exceeding the max raft command size
kv.raft.command.max_size.

In PR cockroachdb#91976, we added support for TargetBytes for resolve intent and
resolve intent range raft commands.

In this PR, we set the TargetBytes field in the resolve intent and
resolve intent range requests in the RequestBatcher and IntentResolver
to half the max raft command size: kv.raft.command.max_size / 2. This
allows us to stop resolving intents in the batch as soon as we get close
to the max raft command size to lower the chance we exceed this limit.

Release note (ops change): Added support for a byte limit on resolve
intent and resolve intent range raft commands to prevent such commands
from exceeding the max raft command size.
@KaiSun314 KaiSun314 force-pushed the intent-resolution-byte-size-pagination branch from f863f2d to 182492c Compare November 21, 2022 16:33
@KaiSun314 KaiSun314 closed this Nov 21, 2022
@KaiSun314 KaiSun314 deleted the intent-resolution-byte-size-pagination branch November 21, 2022 16:36
@KaiSun314 KaiSun314 restored the intent-resolution-byte-size-pagination branch November 21, 2022 16:39
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.

1 participant