Skip to content

Commit

Permalink
Adjust CheckIsReady() to match OnlineDDL's expectation/usage
Browse files Browse the repository at this point in the history
This was only using IsReady() before, now it's using
IsOpen() and IsReady().

Signed-off-by: Matt Lord <mattalord@gmail.com>
  • Loading branch information
mattlord committed Jun 1, 2023
1 parent d9bfece commit d6a9f33
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions go/vt/vttablet/tabletserver/throttle/throttler.go
Original file line number Diff line number Diff line change
Expand Up @@ -222,10 +222,10 @@ func NewThrottler(env tabletenv.Env, srvTopoServer srvtopo.Server, ts *topo.Serv
return throttler
}

// CheckIsReady checks if this throttler is ready to serve. If not, it returns
// an error.
// CheckIsReady checks if this throttler is ready to serve. If not, it
// returns an error.
func (throttler *Throttler) CheckIsReady() error {
if throttler.IsOpen() {
if throttler.IsOpen() && throttler.IsEnabled() {
// all good
return nil
}
Expand Down

0 comments on commit d6a9f33

Please sign in to comment.