Skip to content

Commit

Permalink
feat: handle todo to close topo server
Browse files Browse the repository at this point in the history
Signed-off-by: Manan Gupta <[email protected]>
  • Loading branch information
GuptaManan100 committed Feb 21, 2024
1 parent 27be916 commit 4ef43f6
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 1 deletion.
1 change: 0 additions & 1 deletion go/vt/vtorc/logic/tablet_discovery.go
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,6 @@ func RegisterFlags(fs *pflag.FlagSet) {
// OpenTabletDiscovery opens the vitess topo if enables and returns a ticker
// channel for polling.
func OpenTabletDiscovery() <-chan time.Time {
// TODO(sougou): If there's a shutdown signal, we have to close the topo.
ts = topo.Open()
tmc = tmclient.NewTabletManagerClient()
// Clear existing cache and perform a new refresh.
Expand Down
1 change: 1 addition & 0 deletions go/vt/vtorc/logic/vtorc.go
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,7 @@ func closeVTOrc() {
_ = inst.AuditOperation("shutdown", "", "Triggered via SIGTERM")
// wait for the locks to be released
waitForLocksRelease()
ts.Close()
log.Infof("VTOrc closed")
}

Expand Down

0 comments on commit 4ef43f6

Please sign in to comment.