Comparing v1.1.8...v1.1.9 · github/gh-ost · GitHub
Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: github/gh-ost
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v1.1.8
Choose a base ref
...
head repository: github/gh-ost
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v1.1.9
Choose a head ref
  • 14 commits
  • 59 files changed
  • 10 contributors

Commits on Mar 12, 2026

  1. Replace usage of Fatale with context cancellation (#1639)

    * Replace log.Fatale with context-based error propagation
    
    This patch modifies gh-ost to use a cancellable context instead of
    log.Fatale() in listenOnPanicAbort. When using gh-ost as a library, this
    allows the calling application to recover from aborts (e.g. log the
    failure reason) instead of having the entire process terminate via
    os.Exit(). Now we store the error and cancel a context to signal all
    goroutines to stop gracefully.
    
    * Fix shadowing
    
    * Simplify non-blocking poll
    
    * Simplify non-blocking poll in migrator.go
    
    * Fix error return
    
    * Fix hang on blocking channel send
    
    * Add defensive fix for other potential blocking channel send deadlocks
    
    * Add SendWithContext helper to avoid deadlocks
    
    * Fix deadlock on PanicAbort sends
    
    * Use checkAbort
    
    * Fix migration abort race condition
    
    * Remove buffer on PanicAbort channel
    ggilder authored Mar 12, 2026
    Configuration menu
    Copy the full SHA
    b000b24 View commit details
    Browse the repository at this point in the history

Commits on Mar 17, 2026

  1. Improve tests for various error scenarios (#1642)

    * Improve tests for various error scenarios
    
    - Regex meta characters in index names should not break warning
      detection (required code fix)
    - Improve tests that only checked number of rows (need to validate data
      as well)
    - Test positive case allowing ignored duplicates on migration key
    - Test behavior with PanicOnWarnings disabled
    
    * Address Copilot feedback
    
    * Add test for warnings on composite unique keys
    
    * Add test for updating pk with duplicate
    
    * Improve replica test debugging
    
    - Print log excerpt on failure
    - Upload full log artifacts on failure
    
    * Reduce flakiness in update-pk test
    
    * Revise test
    
    * More robust test fix
    
    * Make MySQL wait strategy less flaky
    
    Removed the `wait.ForExposedPort()` override from test files. The tests
    will now use the MySQL module's default wait strategy
    (`wait.ForLog("port: 3306  MySQL Community Server")`), which properly
    waits for MySQL to be ready to accept connections. Otherwise the port
    may be exposed, but MySQL is still initializing and not ready to accept
    connections.
    
    * Customize update-pk integration test
    
    Add support for test-specific execution so that we can guarantee that
    we're specifically testing the DML apply phase
    
    * Fix regression in integration test harness
    
    * Add test timeouts and fix error propagation
    
    Prevent indefinite test hangs by adding 120-second timeout and
    duration reporting. Fix silent error drops by propagating errors from
    background write goroutines to PanicAbort channel. Check for abort in
    sleepWhileTrue loop and handle its error in cutOver.
    ggilder authored Mar 17, 2026
    Configuration menu
    Copy the full SHA
    67cc636 View commit details
    Browse the repository at this point in the history

Commits on Mar 18, 2026

  1. Add retry logic for instant DDL on lock wait timeout (#1651)

    * Add retry logic for instant DDL on lock wait timeout
    When attempting instant DDL, a lock wait timeout (errno 1205) may occur
    if a long-running transaction holds a metadata lock. Rather than failing
    immediately, retry the operation up to 5 times with linear backoff.
    Non-timeout errors (e.g. ALGORITHM=INSTANT not supported) still return
    immediately without retrying.
    
    * Fix int-to-Duration type mismatch in retry backoff
    
    ---------
    
    Co-authored-by: ybs-me <yosef.bensimchon@melio.com>
    yosefbs and ybs-me authored Mar 18, 2026
    Configuration menu
    Copy the full SHA
    b9652c3 View commit details
    Browse the repository at this point in the history

Commits on Mar 24, 2026

  1. Configuration menu
    Copy the full SHA
    0d5c737 View commit details
    Browse the repository at this point in the history

Commits on Mar 27, 2026

  1. Fix handling of warnings on DML batches (#1643)

    * Handle warnings in middle of DML batch
    
    * Add integration test for batch warnings
    
    * Update expected failure message for update-pk test
    
    ---------
    
    Co-authored-by: meiji163 <meiji163@github.com>
    ggilder and meiji163 authored Mar 27, 2026
    Configuration menu
    Copy the full SHA
    8f274f7 View commit details
    Browse the repository at this point in the history

Commits on Apr 2, 2026

  1. Fix abort/retry interaction (#1655)

    * Add failing test for retry + abort issue
    
    * Fix retry after abort issue
    
    * Skip retries for warning errors
    
    Warning errors indicate data consistency issues that won't resolve on retry, so
    attempting to retry them is futile and causes unnecessary delays. This change
    detects warning errors early and aborts immediately instead of retrying.
    
    * Fix test expectation
    ggilder authored Apr 2, 2026
    Configuration menu
    Copy the full SHA
    8bc63f0 View commit details
    Browse the repository at this point in the history

Commits on Apr 8, 2026

  1. Add GH_OST_INSTANT_DDL for gh-ost-on-success hook (#1658)

    * Add GH_OST_INSTANT_DDL env var for hook
    meiji163 authored Apr 8, 2026
    Configuration menu
    Copy the full SHA
    0270a28 View commit details
    Browse the repository at this point in the history

Commits on Apr 22, 2026

  1. Fix Warning 1300 for varbinary columns with bytes invalid as utf8mb4 (#…

    …1661)
    
    * Fix Warning 1300 for varbinary columns with bytes invalid as utf8mb4
    
    When gh-ost replays a binlog DML event, the go-mysql library returns
    varbinary column values as a Go `string` (not `[]byte`). In convertArg,
    the existing code only converted string → []byte when the column had a
    non-empty Charset (e.g. utf8mb4 for varchar). varbinary columns have no
    character set, so Charset is always "", and the string fell through
    unconverted.
    
    The Go MySQL driver sends `string` args as MYSQL_TYPE_VAR_STRING with
    the connection's utf8mb4 charset metadata attached, causing MySQL to
    validate the bytes. If a varbinary value (e.g. a binary UUID) contains
    byte sequences that are invalid utf8mb4, MySQL emits Warning 1300. With
    gh-ost's panic-on-warnings enabled, this aborts the migration.
    
    Fix: add an else-if branch that detects binary storage types by
    MySQLType (binary, varbinary, *blob) and returns []byte, so the driver
    sends MYSQL_TYPE_BLOB (binary data) with no charset validation.
    
    MySQLType is used rather than Charset == "" alone because test Column
    objects built via NewColumnList leave MySQLType unset, which would have
    changed the return type for all no-charset columns in existing tests.
    In production, inspect.go always populates MySQLType from
    information_schema.data_type.
    
    Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
    
    * Address PR review feedback on varbinary Warning 1300 fix
    
    - Use MySQLType "varbinary(16)" in tests instead of bare "varbinary",
      matching the real value produced by information_schema COLUMN_TYPE
      (which includes length). Guards against future refactors that might
      switch from substring matching to exact matching.
    - Correct test comment: MySQLType is populated from COLUMN_TYPE, not
      data_type.
    - Broaden types.go comment to say "the connection's charset/collation
      metadata (often utf8mb4)" since gh-ost's connection charset is
      configurable via --charset.
    
    Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
    
    * appease linter
    
    ---------
    
    Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
    Co-authored-by: meiji163 <meiji163@github.com>
    3 people authored Apr 22, 2026
    Configuration menu
    Copy the full SHA
    a3d0115 View commit details
    Browse the repository at this point in the history

Commits on Apr 29, 2026

  1. Configuration menu
    Copy the full SHA
    a6a5f49 View commit details
    Browse the repository at this point in the history
  2. Prevent permanent worker deadlock when cutover times out waiting for …

    …binlog sentinel (#1637)
    
    * Prevent permanent worker deadlock when cutover times out waiting for binlog sentinel
    
    Buffer allEventsUpToLockProcessed to MaxRetries() so the applier's send always
    completes immediately even after waitForEventsUpToLock has timed out and exited.
    
    ---------
    
    Co-authored-by: meiji163 <meiji163@github.com>
    VarunChandola and meiji163 authored Apr 29, 2026
    Configuration menu
    Copy the full SHA
    4deeadf View commit details
    Browse the repository at this point in the history

Commits on Apr 30, 2026

  1. Fix OOM when allEventsUpToLockProcessed buffer equals MaxRetries() (#…

    …1666)
    
    PR #1637 buffered allEventsUpToLockProcessed to MaxRetries() to prevent
    a goroutine deadlock when waitForEventsUpToLock times out during cutover.
    However, when --default-retries is set to a very large value (e.g.
    9999999999999), Go tries to allocate a channel with trillions of buffer
    slots, causing an immediate OOM crash before the migration even starts.
    
    Replace the MaxRetries()-sized buffer with a buffer of 1 and
    overwrite-oldest (latest-wins) send semantics. When the buffer is full
    (receiver timed out on a previous attempt), the stale message is drained
    before sending the current sentinel. This guarantees:
    
    - The current sentinel is always delivered (no message loss)
    - The executeWriteFuncs worker is never blocked (no deadlock)
    - Memory usage is constant regardless of MaxRetries() (no OOM)
    
    Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
    dnovitski and Copilot authored Apr 30, 2026
    Configuration menu
    Copy the full SHA
    b13e116 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    29c0c33 View commit details
    Browse the repository at this point in the history

Commits on May 1, 2026

  1. Configuration menu
    Copy the full SHA
    4d37b8a View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    4d38923 View commit details
    Browse the repository at this point in the history
Loading