Skip to content

Fix batch size optimizer clamp error

Jon Jenkins requested to merge 393067-max-batch-error into master

What does this MR do and why?

Solves #393067 (closed). When a BBM is started with a max batch size that is smaller than the min batch size, the clamp method called on the new batch size will throw an error.

This fixes the bug and prevents the process from erroring, but I believe a more extensive discussion needs to be had about valid input parameters for BBMs.

How to set up and validate locally

This is a completely unit-testable fix:

bundle exec rspec spec/lib/gitlab/database/background_migration/batch_optimizer_spec.rb

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Related to #393067 (closed)

Merge request reports

Loading