Skip to content

Align max --dml-batch-size with the implementation #1575

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

Merged
merged 1 commit into from
Aug 12, 2025

Conversation

yktakaha4
Copy link
Contributor

@yktakaha4 yktakaha4 commented Aug 12, 2025

A Pull Request should be associated with an Issue.

We wish to have discussions in Issues. A single issue may be targeted by multiple PRs.
If you're offering a new feature or fixing anything, we'd like to know beforehand in Issues,
and potentially we'll be able to point development in a particular direction.

Related issue: None

Further notes in https://github.com/github/gh-ost/blob/master/.github/CONTRIBUTING.md
Thank you! We are open to PRs, but please understand if for technical reasons we are unable to accept each and any PR

Description

This PR updates the upper limit of the --dml-batch-size flag from 100 to 1000 to match the actual implementation.

The upper limit of --dml-batch-size has not changed since 2017.

ref: #438

gh-ost/go/base/context.go

Lines 645 to 652 in 7c3b9a1

func (this *MigrationContext) SetDMLBatchSize(batchSize int64) {
if batchSize < 1 {
batchSize = 1
}
if batchSize > MaxEventsBatchSize {
batchSize = MaxEventsBatchSize
}
atomic.StoreInt64(&this.DMLBatchSize, batchSize)

MaxEventsBatchSize = 1000

In case this PR introduced Go code changes:

  • contributed code is using same conventions as original code
  • script/cibuild returns with no formatting errors, build errors or unit test errors.

@yktakaha4 yktakaha4 requested a review from rashiq as a code owner August 12, 2025 05:32
@Copilot Copilot AI review requested due to automatic review settings August 12, 2025 05:32
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR updates the upper limit of the --dml-batch-size flag from 100 to 1000 to align the documentation and command-line help text with the actual implementation, which has supported up to 1000 since 2017.

  • Updated the command-line flag description in main.go to reflect the correct upper limit
  • Updated the documentation to match the implementation's actual supported range

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
go/cmd/gh-ost/main.go Updated dml-batch-size flag description to show correct range (1-1000)
doc/command-line-flags.md Updated documentation to reflect the actual supported range for dml-batch-size

@yktakaha4 yktakaha4 changed the title Align max dml-batch-size with the implementation Align max --zdml-batch-size with the implementation Aug 12, 2025
@yktakaha4 yktakaha4 changed the title Align max --zdml-batch-size with the implementation Align max --dml-batch-size with the implementation Aug 12, 2025
@meiji163 meiji163 merged commit 7cc7cc8 into github:master Aug 12, 2025
8 checks passed
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