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

[release-18.0] servenv: Remove double close() logic (#14457) #14459

Merged
merged 1 commit into from
Nov 4, 2023
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
2 changes: 0 additions & 2 deletions go/cmd/mysqlctld/cli/mysqlctld.go
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,6 @@ var (
Long: "`mysqlctld` is a gRPC server that can be used instead of the `mysqlctl` client tool.\n" +
"If the target directories are empty when it is invoked, it automatically performs initialization operations to bootstrap the `mysqld` instance before starting it.\n" +
"The `mysqlctld` process can subsequently receive gRPC commands from a `vttablet` to perform housekeeping operations like shutting down and restarting the `mysqld` instance as needed.\n\n" +

"{{< warning >}}\n" +
"`mysqld_safe` is not used so the `mysqld` process will not be automatically restarted in case of a failure.\n" +
"{{</ warning>}}\n\n" +
Expand Down Expand Up @@ -151,7 +150,6 @@ func run(cmd *cobra.Command, args []string) error {
cancel()

servenv.Init()
defer servenv.Close()

// Take mysqld down with us on SIGTERM before entering lame duck.
servenv.OnTermSync(func() {
Expand Down
1 change: 0 additions & 1 deletion go/cmd/vtaclcheck/cli/vtactlcheck.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@ var (

func run(cmd *cobra.Command, args []string) error {
servenv.Init()
defer servenv.Close()

opts := &vtaclcheck.Options{
ACLFile: aclFile,
Expand Down
1 change: 0 additions & 1 deletion go/cmd/vtbackup/cli/vtbackup.go
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,6 @@ func init() {

func run(_ *cobra.Command, args []string) error {
servenv.Init()
defer servenv.Close()

ctx, cancel := context.WithCancel(context.Background())
servenv.OnClose(func() {
Expand Down
1 change: 0 additions & 1 deletion go/cmd/vtbench/cli/vtbench.go
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,6 @@ func run(cmd *cobra.Command, args []string) error {
_ = cmd.Flags().Set("logtostderr", "true")

servenv.Init()
defer servenv.Close()

var clientProto vtbench.ClientProtocol
switch protocol {
Expand Down
1 change: 0 additions & 1 deletion go/cmd/vtctld/cli/cli.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,6 @@ This is demonstrated in the example usage below.`,

func run(cmd *cobra.Command, args []string) error {
servenv.Init()
defer servenv.Close()

ts = topo.Open()
defer ts.Close()
Expand Down
1 change: 0 additions & 1 deletion go/cmd/vtgate/cli/cli.go
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,6 @@ func run(cmd *cobra.Command, args []string) error {
defer exit.Recover()

servenv.Init()
defer servenv.Close()

ts := topo.Open()
defer ts.Close()
Expand Down
1 change: 0 additions & 1 deletion go/cmd/vttablet/cli/cli.go
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,6 @@ vttablet \

func run(cmd *cobra.Command, args []string) error {
servenv.Init()
defer servenv.Close()

tabletAlias, err := topoproto.ParseTabletAlias(tabletPath)
if err != nil {
Expand Down
5 changes: 0 additions & 5 deletions go/vt/servenv/run.go
Original file line number Diff line number Diff line change
Expand Up @@ -74,11 +74,6 @@ func Run(bindAddress string, port int) {

log.Info("Shutting down gracefully")
fireOnCloseHooks(onCloseTimeout)
}

// Close runs any registered exit hooks in parallel.
func Close() {
onCloseHooks.Fire()
ListeningURL = url.URL{}
}

Expand Down
Loading