-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Comparing changes
Open a pull request
base repository: github/gh-ost
base: v1.1.7
head repository: github/gh-ost
compare: master
- 18 commits
- 463 files changed
- 16 contributors
Commits on Jan 5, 2025
-
Improve logic to include originalUniqueKey in sharedUniqueKeys (#1453)
Until now, when building the list of SharedUniqueKeys, the code was selecting only the originalUniqueKeys that existed in ghostUniqueKeys list. However, as part of the alter table, it is possible to add more unique keys or even composed primary keys with multiple columns. The new logic keeps the old behaviour (it matches originalUniqueKey with exactly the same ghostUniqueKey) but also supports the cases where the originalUniqueKey is now a subset of one of the new ghostUniqueKeys. If such a case happens, we can still use the originalUniqueKey as normal because a new ghostUniqueKey with the columns of originalUniqueKey plus some new columns is inherently unique just by the columns in the originalUniqueKey, no matter the value in the new columns of the new unique key.
Configuration menu - View commit details
-
Copy full SHA for ad5d3ea - Browse repository at this point
Copy the full SHA ad5d3eaView commit details
Commits on Feb 10, 2025
-
* WIP: MySQL 8.4 support * Add go-version for doing version comparisons * docker-gh-ost-replica-tests: Support MySQL 8.4+ * localtests: Support MySQL 8.4 * Remove mysql-8.4.3 from replica-tests GHA since dbdeployer / ci env does not have 8.4.3 * MySQL 8.4: Actually use caching_sha2_password pw strategy * Commit up vendor/github.com/hashicorp/go-version * Add GHA job for docker-gh-ost-replica-tests * localtests/test.sh: Fix conditional bug and replica_terminology typo
Configuration menu - View commit details
-
Copy full SHA for be413cf - Browse repository at this point
Copy the full SHA be413cfView commit details -
Prevent exponential backoff from overflowing. (#1491)
When using `-cut-over-exponential-backoff` with `-default-retries` greater than `64`, the sleep interval will overflow and immediately begin retrying in rapid succession. This commit corrects the backoff algorithm and adds test for both "retry operation" functions. Co-authored-by: meiji163 <meiji163@github.com>
Configuration menu - View commit details
-
Copy full SHA for 2ea0e60 - Browse repository at this point
Copy the full SHA 2ea0e60View commit details
Commits on Feb 24, 2025
-
Fix TLS verify error when gh-ost discovers the replication master (#1487
) * Update connection.DuplicateCredentials function to set correct ServerName property Ensure the ServerName TLS property matches the new connection instance key hostname to avoid TLS verify errors like the following: 2025-01-02 02:07:26 FATAL tls: failed to verify certificate: x509: certificate is valid for [old host], not [new host] This is only one part of the fix for this issue. The second part, registering TLS Config with the mysql driver, will come in subsequent commits. * Use connection.DuplicateCredentials in cases where the connection key changes * Extract TLS config key name generation to GetDBTLSConfigKey function * Extract function to register a connection's TLS config with the mysql driver This allows us to register TLS configuration is the various places where connection configs are created and before they're used. * Register TLS config when setting up master connection info This ensures that the master's TLS config has been registered with the mysql driver before any connections are attempted. This is the second part of resolving the following TLS verify error: 2025-01-02 02:07:26 FATAL tls: failed to verify certificate: x509: certificate is valid for [old host], not [new host] * Register TLS config when setting up the throttler's connection info This ensures that the throttler's TLS config has been registered with the mysql driver before any connections are attempted. This is the second part of resolving the following TLS verify error: 2025-01-02 02:07:26 FATAL tls: failed to verify certificate: x509: certificate is valid for [old host], not [new host] --------- Co-authored-by: meiji163 <meiji163@github.com>
Configuration menu - View commit details
-
Copy full SHA for d8672f7 - Browse repository at this point
Copy the full SHA d8672f7View commit details
Commits on Feb 28, 2025
-
Avoid logging MySQL connection configs (#1501)
* Fix clear-text logging of connection config Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com> * don't log connection configs --------- Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
Configuration menu - View commit details
-
Copy full SHA for 7ea3047 - Browse repository at this point
Copy the full SHA 7ea3047View commit details
Commits on Mar 3, 2025
-
Fix #1502 Add triggers support (#1503)
* Add trigger support to gh-ost based on openark#30 * Add comprehensive test cases for trigger support functionality * Fix trigger-basic test by adding required --trigger-suffix parameter and remove fail-trigger-unsupported test * Update trigger suffix in local test configurations Modify extra_args files for trigger-complex, trigger-multiple, and trigger-self-reference tests to use different trigger suffixes * Add --remove-trigger-suffix-if-exists to local test configurations Update extra_args files for trigger tests to include the new --remove-trigger-suffix-if-exists option, ensuring consistent trigger handling across different test scenarios * Fix trigger-long-name test by reducing trigger name length to be valid * Standardize trigger drop statements in local test configurations Update create.sql files across trigger test scenarios to: - Consistently drop both original and ghost triggers - Ensure clean slate before creating triggers - Align with recent trigger suffix changes This change improves test reliability and consistency by explicitly dropping all potential trigger variations before test setup. * Consolidate and enhance trigger test configurations Refactor local test scenarios for triggers by: - Merging multiple trigger test configurations into comprehensive test cases - Updating create.sql files with more complex and diverse trigger scenarios - Standardizing trigger and table setup across different test configurations - Removing redundant test directories while preserving test coverage This change simplifies the trigger testing infrastructure and provides more robust test coverage for gh-ost's trigger handling capabilities. * Add debug logging for ghost trigger validation process Enhance ghost trigger existence check by adding detailed debug logging to: - Log the ghost trigger name being searched - Log the database schema and query details - Log when an existing ghost trigger is found This change improves visibility into the trigger validation process, making troubleshooting easier during migration scenarios. * Improve ghost trigger validation with enhanced logging and verification Modify validateGhostTriggersDontExist() to: - Add a direct query to log all triggers in the database schema - Refactor trigger existence check to use count-based query - Improve debug logging for trigger validation process - Provide more detailed error reporting for existing ghost triggers This change enhances the robustness and observability of the trigger validation mechanism in gh-ost's migration process. * Refactor ghost trigger validation to improve logging and error detection Simplify and enhance the validateGhostTriggersDontExist() method by: - Removing redundant direct query logging - Streamlining trigger existence check - Improving debug logging for trigger validation - Consolidating trigger existence detection logic The changes provide more concise and focused trigger validation with clearer error reporting. * Simplify ghost trigger validation query and reduce logging verbosity Refactor validateGhostTriggersDontExist() to: - Streamline trigger existence check query - Remove redundant debug logging statements - Use a more concise approach to detecting existing triggers The changes reduce code complexity while maintaining the core validation logic for ghost triggers. * Enhance ghost trigger validation query to include table name filter Modify validateGhostTriggersDontExist() to: - Add table name filter to trigger existence check query - Improve specificity of ghost trigger detection - Prevent false positives from similarly named triggers in different tables The change ensures more precise ghost trigger validation by incorporating the original table name into the query criteria. * Enhance trigger test configuration with advanced features and consolidated test scenarios Update trigger-advanced-features test configuration to: - Add new column 'color' and 'modified_count' to test table - Implement more complex trigger logic for color and count tracking - Consolidate trigger test scenarios with richer data transformations - Modify event to test both numeric and color-based updates - Remove redundant trigger-basic-features directory The changes provide a more comprehensive and nuanced test suite for gh-ost's trigger handling capabilities, demonstrating advanced trigger behaviors and self-referencing updates. * Fix lint errors * Update trigger test configuration with suffix change Modify the extra_args file to use '_ght' trigger suffix instead of '_gho', maintaining consistency with recent trigger test configuration updates. * Remove gh-ost-ci-env submodule Clean up repository by removing the gh-ost-ci-env submodule, which appears to be no longer needed in the project structure. * Update create.sql --------- Co-authored-by: Yakir Gibraltar <yakir.g@taboola.com>
Configuration menu - View commit details
-
Copy full SHA for 0263a20 - Browse repository at this point
Copy the full SHA 0263a20View commit details
Commits on Mar 14, 2025
-
Configuration menu - View commit details
-
Copy full SHA for 5713a29 - Browse repository at this point
Copy the full SHA 5713a29View commit details
Commits on Mar 18, 2025
-
Upgrade go to 1.23.0,
net
module to 0.36.0 (#1511)* Bump golang.org/x/net in the go_modules group across 1 directory Bumps the go_modules group with 1 update in the / directory: [golang.org/x/net](https://github.com/golang/net). Updates `golang.org/x/net` from 0.33.0 to 0.36.0 - [Commits](golang/net@v0.33.0...v0.36.0) --- updated-dependencies: - dependency-name: golang.org/x/net dependency-type: direct:production dependency-group: go_modules ... Signed-off-by: dependabot[bot] <support@github.com> * go mod tidy * Remove toolchain directive from go.mod * fix go version * try update golangci * remove deprecated linters * remove unused nolint comment --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: meiji163 <meiji163@github.com>
Configuration menu - View commit details
-
Copy full SHA for 9d6e3e9 - Browse repository at this point
Copy the full SHA 9d6e3e9View commit details
Commits on Mar 19, 2025
-
Configuration menu - View commit details
-
Copy full SHA for 5c3e42a - Browse repository at this point
Copy the full SHA 5c3e42aView commit details
Commits on Mar 26, 2025
-
PanicOnWarnings option to detect SQL warnings and fail the copy proce…
…ss (#1500) * First pass at raise_on_warnings * Update dev.yml * add CLI option, ignore expected warnings, check for row count discrepancy * Count rows in each insert range prepared query - log insert warnings always - terminate if row count doesn't match and the PanicOnWarnings flag is set * Lint comments - ensure errors are handled in show warnings * update TestBuildUniqueKeyRangeEndPreparedQuery * Localtests for PanicOnWarnings with data loss * Unwrap CTE (mysql 5) * Update localtests/panic-on-warnings-duplicate-unique-values-on-column-type-change/extra_args Co-authored-by: Bastian Bartmann <accounts@bastianbartmann.de> * limit BuildUniqueKeyRangeEndPreparedQueryViaOffset subquery properly * Update Applier to support all unique indices with PanicOnWarnings. Add test coverage. * Impl code review feedback for PanicOnWarnings - documentation - remove dev.yml - remove unused variable * bump golangci-lint for local dev * Support altering index names with PanicOnWarnings * Fix string matching for PanicOnWarnings to correctly suppress warnings when renaming unique keys Error message formats are different across mysql distributions and versions --------- Co-authored-by: Bastian Bartmann <accounts@bastianbartmann.de>
Configuration menu - View commit details
-
Copy full SHA for eedac87 - Browse repository at this point
Copy the full SHA eedac87View commit details
Commits on Apr 3, 2025
-
Remove restriction on password length and bump go-mysql to 1.11.0 (#1525
Configuration menu - View commit details
-
Copy full SHA for 801ebab - Browse repository at this point
Copy the full SHA 801ebabView commit details
Commits on Apr 7, 2025
-
Final cleanup after InstantDDL (#1520)
* fix: move successful cleanup into func * fix: ignore linter error * fix: inline onSuccessFunc function
Configuration menu - View commit details
-
Copy full SHA for 9059f30 - Browse repository at this point
Copy the full SHA 9059f30View commit details -
Bump github.com/containerd/containerd from 1.7.18 to 1.7.27 in the go…
…_modules group across 1 directory (#1513) * Bump github.com/containerd/containerd Bumps the go_modules group with 1 update in the / directory: [github.com/containerd/containerd](https://github.com/containerd/containerd). Updates `github.com/containerd/containerd` from 1.7.18 to 1.7.27 - [Release notes](https://github.com/containerd/containerd/releases) - [Changelog](https://github.com/containerd/containerd/blob/main/RELEASES.md) - [Commits](containerd/containerd@v1.7.18...v1.7.27) --- updated-dependencies: - dependency-name: github.com/containerd/containerd dependency-type: indirect dependency-group: go_modules ... Signed-off-by: dependabot[bot] <support@github.com> * Remove toolchain directive from go.mod --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: meiji163 <meiji163@github.com>
Configuration menu - View commit details
-
Copy full SHA for d651ae9 - Browse repository at this point
Copy the full SHA d651ae9View commit details
Commits on Apr 8, 2025
-
Use docker for CI replica tests, deprecate dbdeployer (#1529)
* use docker for ci tests * set charset server * remove unusued cibuild-gh-ost-replica-tests * add doc for how to run localtests
Configuration menu - View commit details
-
Copy full SHA for 4502796 - Browse repository at this point
Copy the full SHA 4502796View commit details
Commits on May 9, 2025
-
Bump golang.org/x/net in the go_modules group across 1 directory
Bumps the go_modules group with 1 update in the / directory: [golang.org/x/net](https://github.com/golang/net). Updates `golang.org/x/net` from 0.36.0 to 0.38.0 - [Commits](golang/net@v0.36.0...v0.38.0) --- updated-dependencies: - dependency-name: golang.org/x/net dependency-version: 0.38.0 dependency-type: direct:production dependency-group: go_modules ... Signed-off-by: dependabot[bot] <support@github.com>
Configuration menu - View commit details
-
Copy full SHA for d864119 - Browse repository at this point
Copy the full SHA d864119View commit details -
Merge pull request #1534 from github/dependabot/go_modules/go_modules…
…-bbb8b02913 Bump golang.org/x/net from 0.36.0 to 0.38.0 in the go_modules group across 1 directory
Configuration menu - View commit details
-
Copy full SHA for 5c88f54 - Browse repository at this point
Copy the full SHA 5c88f54View commit details
Commits on Jun 5, 2025
-
Remove counts from CalculateNextIterationRangeEndValues that caused p…
…roblems with --panic-on-warnings (#1557) * Fix CalculateNextIterationRangeEndValues order by. The split between Temptable and Offset query builders was originally introduced in #471. Then, both query builders have been changed to calculate actual chunk sizes in #1500. The updated implementation of the Offset query introduced a bug, where a missing `order by` clause in `select_osc_chunk` can result in end values potentially surpassing the chunk_size. This wasn't detected during our initial testing where the query just returned rows in their original order, but may happen in real-world scenarios in case the db returns data in an undefined order. An obvious fix would be to just add an `order by` to the Offset builder subquery, however since both builders use temptables now, it makes more sense to simplify and use only one of them. Alternatively, the builder could only use the less performant count query variants when `--panic-on-warnings` is enabled and otherwise use the simpler ones from pull/471. We decided to not follow this path for now, hoping `--panic-on-warnings` becomes an updated and safer default in the future. Co-authored-by: Bastian Bartmann <bastian.bartmann@shopify.com> * Fix builder's chunk order and drop panic-on-warnings row count check - Removed count subqueries from range builders to restore the more performant approach from PR #471 - Modified panic-on-warnings logic to trigger errors based solely on SQL warnings, not on row count mismatches - This addresses potential race conditions where row count comparisons could produce false positives due to concurrent table modifications --------- Co-authored-by: Bastian Bartmann <bastian.bartmann@shopify.com>
Configuration menu - View commit details
-
Copy full SHA for 7c18055 - Browse repository at this point
Copy the full SHA 7c18055View commit details -
Fix output for
binary
keys in-verbose
mode. (#1559)When migrating a table with a `binary` key in `-verbose` mode, different sequences of bytes may prevent execution output from being logged, or correctly logged, to the console. This happens because the `MigrationRange*Values` are printed to the screen without any type of encoding. One particularly problematic sequence is `0x27`, `Escape`, which causes the terminal to stop logging for the duration of the migration: ``` 2025-05-23 11:53:27 INFO Listening on unix socket file: /tmp/gh-ost.test.binfoo.sock 2025-05-23 11:53:27 INFO Intercepted changelog state ReadMigrationRangeValues 2025-05-23 11:53:27 INFO Handled changelog state ReadMigrationRangeValues 2025-05-23 11:53:27 INFO Migration min values: [ ``` This commit changes the to-string rendering for `binary` keys, rendering the values as a hex string rather than an unescaped series of bytes. Co-authored-by: meiji163 <meiji163@github.com>
Configuration menu - View commit details
-
Copy full SHA for fb3d71d - Browse repository at this point
Copy the full SHA fb3d71dView commit details
This comparison is taking too long to generate.
Unfortunately it looks like we can’t render this comparison for you right now. It might be too big, or there might be something weird with your repository.
You can try running this command locally to see the comparison on your machine:
git diff v1.1.7...master