diff --git a/pkg/controller/vitesskeyspace/reconcile_handler.go b/pkg/controller/vitesskeyspace/reconcile_handler.go index 26726d88..fb41cbee 100644 --- a/pkg/controller/vitesskeyspace/reconcile_handler.go +++ b/pkg/controller/vitesskeyspace/reconcile_handler.go @@ -75,7 +75,7 @@ func (r *reconcileHandler) tsInit(ctx context.Context) error { r.tmc = tmclient.NewTabletManagerClient() } - collationEnv, parser, err := environment.GetCollationEnvAndParser() + collationEnv, parser, err := environment.CollationEnvAndParser() if err != nil { return err } diff --git a/pkg/controller/vitessshard/reconcile_topo.go b/pkg/controller/vitessshard/reconcile_topo.go index 6ea37a39..9769ecc2 100644 --- a/pkg/controller/vitessshard/reconcile_topo.go +++ b/pkg/controller/vitessshard/reconcile_topo.go @@ -64,7 +64,7 @@ func (r *ReconcileVitessShard) reconcileTopology(ctx context.Context, vts *plane return resultBuilder.RequeueAfter(topoRequeueDelay) } defer ts.Close() - collationEnv, parser, err := environment.GetCollationEnvAndParser() + collationEnv, parser, err := environment.CollationEnvAndParser() if err != nil { return resultBuilder.Error(err) } diff --git a/pkg/controller/vitessshardreplication/vitessshardreplication_controller.go b/pkg/controller/vitessshardreplication/vitessshardreplication_controller.go index d70d6974..644541c3 100644 --- a/pkg/controller/vitessshardreplication/vitessshardreplication_controller.go +++ b/pkg/controller/vitessshardreplication/vitessshardreplication_controller.go @@ -194,7 +194,7 @@ func (r *ReconcileVitessShard) Reconcile(cctx context.Context, request reconcile tmc := tmclient.NewTabletManagerClient() defer tmc.Close() - collationEnv, parser, err := environment.GetCollationEnvAndParser() + collationEnv, parser, err := environment.CollationEnvAndParser() if err != nil { return resultBuilder.Error(err) } diff --git a/pkg/operator/environment/environment.go b/pkg/operator/environment/environment.go index 525b132b..bd9404c1 100644 --- a/pkg/operator/environment/environment.go +++ b/pkg/operator/environment/environment.go @@ -66,8 +66,8 @@ func ReconcileTimeout() time.Duration { return reconcileTimeout } -// GetCollationEnvAndParser gets the collation environment and parser to be used in the operator. -func GetCollationEnvAndParser() (*collations.Environment, *sqlparser.Parser, error) { +// CollationEnvAndParser gets the collation environment and parser to be used in the operator. +func CollationEnvAndParser() (*collations.Environment, *sqlparser.Parser, error) { collationEnv := collations.NewEnvironment(mySQLServerVersion) parser, err := sqlparser.New(sqlparser.Options{ MySQLServerVersion: mySQLServerVersion, diff --git a/pkg/operator/vitesstopo/prune_keyspaces.go b/pkg/operator/vitesstopo/prune_keyspaces.go index 92ada35e..445b10a8 100644 --- a/pkg/operator/vitesstopo/prune_keyspaces.go +++ b/pkg/operator/vitesstopo/prune_keyspaces.go @@ -92,7 +92,7 @@ func KeyspacesToPrune(keyspaceNames []string, desiredKeyspaces sets.String, orph func DeleteKeyspaces(ctx context.Context, ts *topo.Server, recorder record.EventRecorder, eventObj runtime.Object, keyspaceNames []string) (reconcile.Result, error) { resultBuilder := &results.Builder{} - collationEnv, parser, err := environment.GetCollationEnvAndParser() + collationEnv, parser, err := environment.CollationEnvAndParser() if err != nil { return resultBuilder.Error(err) } diff --git a/pkg/operator/vitesstopo/prune_shards.go b/pkg/operator/vitesstopo/prune_shards.go index 092822b4..3cb63a7c 100644 --- a/pkg/operator/vitesstopo/prune_shards.go +++ b/pkg/operator/vitesstopo/prune_shards.go @@ -84,7 +84,7 @@ func ShardsToPrune(currentShards []string, desiredShards sets.String, orphanedSh func DeleteShards(ctx context.Context, ts *topo.Server, recorder record.EventRecorder, eventObj runtime.Object, keyspaceName string, shardNames []string) (reconcile.Result, error) { resultBuilder := &results.Builder{} - collationEnv, parser, err := environment.GetCollationEnvAndParser() + collationEnv, parser, err := environment.CollationEnvAndParser() if err != nil { return resultBuilder.Error(err) }