Skip to content

Commit

Permalink
tiny change
Browse files Browse the repository at this point in the history
Signed-off-by: Ryan Leung <[email protected]>
  • Loading branch information
rleungx committed Aug 21, 2024
1 parent df9ced8 commit a36ad5d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions client/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -660,7 +660,7 @@ func (c *client) Close() {
}
}

func (c *client) setServiceMode(newMode pdpb.ServiceMode, force bool) {
func (c *client) setServiceMode(newMode pdpb.ServiceMode, skipSameMode bool) {
c.Lock()
defer c.Unlock()

Expand All @@ -669,7 +669,7 @@ func (c *client) setServiceMode(newMode pdpb.ServiceMode, force bool) {
newMode = pdpb.ServiceMode_PD_SVC_MODE
}

if !force && newMode == c.serviceMode {
if skipSameMode && newMode == c.serviceMode {
return
}
log.Info("[pd] changing service mode",
Expand Down

0 comments on commit a36ad5d

Please sign in to comment.