QQ: checkpointing frequency improvements (backport #11964) #12023
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The current approach takes too many checkpoints which affects performance negatively, especially with large backlogs.
This PR takes an approach more similar to what was done for release cursors in 3.13.x.
Also add a force_checkpoint aux command that the purge operation
emits - this can also be used to try to force a checkpoint
The checkpointing config can be changed by setting the the
quorum_queue_checkpoint_config
persistent term:persistent_term:set(quorum_queue_checkpoint_config, {MinIntervalMs, MinIndexes, MaxIndexes}).
the current values are:
{1000, 4096, 666667}
which means it will take a checkpoint at most every 1s as long as at least 4096 indexes have been applied. The min indexes between each checkpoint will grow in line with the message backlog up to at most 666667.This is an automatic backport of pull request #11964 done by Mergify.