Skip to content

Enable throttler in move-tables mode#1713

Merged
zacharysierakowski merged 1 commit into
feature-move-tablesfrom
danieljoos-move-tables-enable-throttler
Jun 18, 2026
Merged

Enable throttler in move-tables mode#1713
zacharysierakowski merged 1 commit into
feature-move-tablesfrom
danieljoos-move-tables-enable-throttler

Conversation

@danieljoos

Copy link
Copy Markdown
Contributor

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 (internal): https://github.com/github/database-infrastructure/issues/8212
Related issue (public): #1681

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 enables throttling in move-tables mode.
The code was conditionally turned off at the beginning of development.

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.

Copilot AI review requested due to automatic review settings June 18, 2026 15:14

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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 enables throttling during the main write/apply loop when running gh-ost in move-tables mode, aligning move-tables execution with the existing throttler behavior used in standard migrations.

Changes:

  • Remove the move-tables-mode guard that previously disabled throttler.throttle(nil) in the executeWriteFuncs() loop.
  • Ensure the write/apply loop is always subject to throttling decisions (HTTP throttling, control-replica lag, max-load/critical-load, flag-file/user throttle).
Show a summary per file
File Description
go/logic/migrator.go Enables throttling in move-tables mode by always calling the throttler inside the primary write/apply loop.

Copilot's findings

Tip

Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

  • Files reviewed: 1/1 changed files
  • Comments generated: 1

Comment thread go/logic/migrator.go
// https://github.com/github/database-infrastructure/issues/8212
mgtr.throttler.throttle(nil)
}
mgtr.throttler.throttle(nil)
@zacharysierakowski zacharysierakowski merged commit b979990 into feature-move-tables Jun 18, 2026
7 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.

3 participants