forked from cockroachdb/cockroach
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
changefeedccl: fix panics when min_checkpoint_frequency is 0
Previously, we introduced the cluster setting changefeed.aggregator.flush_jitter to apply some jitter to the aggregator flush frequency. This was done to reduce the load on the coordinator by spreading out aggregator flush times. However, that PR did not account for the case where min_checkpoint_frequency is set to zero, which could cause panics due to rand.Int63(0). This patch fixes the issue by adding a check for when the frequency is zero, ensuring that jitter is not applied in such cases. Fixes: cockroachdb#125312 Release note (bug fix): Fixed a bug in v24.1, v23.2, and v23.1 where using changefeed.aggregator.flush_jitter with min_checkpoint_frequency set to zero could cause panics.
- Loading branch information
Showing
4 changed files
with
122 additions
and
32 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters