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 2 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.

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