Skip to content
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

Online DDL: unsupporting gh-ost DDL strategy #15693

Merged
merged 5 commits into from
Apr 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
151 changes: 0 additions & 151 deletions .github/workflows/cluster_endtoend_onlineddl_ghost.yml

This file was deleted.

162 changes: 0 additions & 162 deletions .github/workflows/cluster_endtoend_onlineddl_ghost_mysql57.yml

This file was deleted.

9 changes: 9 additions & 0 deletions changelog/20.0/20.0.0/summary.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
- **[Deletions](#deletions)**
- [MySQL binaries in the vitess/lite Docker images](#vitess-lite)
- [vitess/base and vitess/k8s Docker images](#base-k8s-images)
- [`gh-ost` binary and endtoend tests](#gh-ost-binary-tests-removal)
- **[Breaking changes](#breaking-changes)**
- [`shutdown_grace_period` Default Change](#shutdown-grace-period-default)
- [New `unmanaged` Flag and `disable_active_reparents` deprecation](#unmanaged-flag)
Expand Down Expand Up @@ -79,6 +80,14 @@ Since we have deleted MySQL from our `vitess/lite` image, we are removing the `v

These images are no longer useful since we can use `vitess/lite` as the base of many other Docker images (`vitess/vtgate`, `vitess/vtgate`, ...).

#### <a id="gh-ost-binary-tests-removal"/>`gh-ost` binary and endtoend tests

Vitess 20.0 drops support for `gh-ost` DDL strategy.

`vttablet` binary no longer embeds a `gh-ost` binary. Users of `gh-ost` DDL strategy will need to supply a `gh-ost` binary on the `vttablet` host or pod. Vitess will look for the `gh-ost` binary in the system `PATH`; otherwise the user should supply `vttablet --gh-ost-path`.

Vitess' endtoend tests no longer use nor test `gh-ost` migrations.

### <a id="breaking-changes"/>Breaking Changes

#### <a id="shutdown-grace-period-default"/>`shutdown_grace_period` Default Change
Expand Down
26 changes: 0 additions & 26 deletions go/cmd/vttablet/cli/cli.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ limitations under the License.
package cli

import (
"bytes"
"context"
"fmt"
"os"
Expand All @@ -38,14 +37,12 @@ import (
"vitess.io/vitess/go/vt/topo"
"vitess.io/vitess/go/vt/topo/topoproto"
"vitess.io/vitess/go/vt/vtenv"
"vitess.io/vitess/go/vt/vttablet/onlineddl"
"vitess.io/vitess/go/vt/vttablet/tabletmanager"
"vitess.io/vitess/go/vt/vttablet/tabletmanager/vdiff"
"vitess.io/vitess/go/vt/vttablet/tabletmanager/vreplication"
"vitess.io/vitess/go/vt/vttablet/tabletserver"
"vitess.io/vitess/go/vt/vttablet/tabletserver/tabletenv"
"vitess.io/vitess/go/yaml2"
"vitess.io/vitess/resources"

topodatapb "vitess.io/vitess/go/vt/proto/topodata"
)
Expand Down Expand Up @@ -144,10 +141,6 @@ func run(cmd *cobra.Command, args []string) error {
mysqld := mysqlctl.NewMysqld(config.DB)
servenv.OnClose(mysqld.Close)

if err := extractOnlineDDL(); err != nil {
ts.Close()
return fmt.Errorf("failed to extract online DDL binaries: %w", err)
}
// Initialize and start tm.
gRPCPort := int32(0)
if servenv.GRPCPort() != 0 {
Expand Down Expand Up @@ -236,25 +229,6 @@ func initConfig(tabletAlias *topodatapb.TabletAlias, collationEnv *collations.En
return config, mycnf, nil
}

// extractOnlineDDL extracts the gh-ost binary from this executable. gh-ost is appended
// to vttablet executable by `make build` with a go:embed
func extractOnlineDDL() error {
if binaryFileName, isOverride := onlineddl.GhostBinaryFileName(); !isOverride {
if err := os.WriteFile(binaryFileName, resources.GhostBinary, 0755); err != nil {
// One possibility of failure is that gh-ost is up and running. In that case,
// let's pause and check if the running gh-ost is exact same binary as the one we wish to extract.
foundBytes, _ := os.ReadFile(binaryFileName)
if bytes.Equal(resources.GhostBinary, foundBytes) {
// OK, it's the same binary, there is no need to extract the file anyway
return nil
}
return err
}
}

return nil
}

func createTabletServer(ctx context.Context, env *vtenv.Environment, config *tabletenv.TabletConfig, ts *topo.Server, tabletAlias *topodatapb.TabletAlias, srvTopoCounts *stats.CountersWithSingleLabel) (*tabletserver.TabletServer, error) {
if tableACLConfig != "" {
// To override default simpleacl, other ACL plugins must set themselves to be default ACL factory
Expand Down
Loading
Loading