Print the server id when active-standby switch (#27119)

Signed-off-by: longjiquan <jiquan.long@zilliz.com>
This commit is contained in:
Jiquan Long 2023-10-07 10:01:31 +08:00 committed by GitHub
parent 6d4492d290
commit 5c1abfa2cc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1012,7 +1012,7 @@ func (s *Session) ProcessActiveStandBy(activateFunc func() error) error {
}
s.updateStandby(false)
log.Info(fmt.Sprintf("serverName: %v quit STANDBY mode, this node will become ACTIVE", s.ServerName))
log.Info(fmt.Sprintf("serverName: %v quit STANDBY mode, this node will become ACTIVE, ID: %d", s.ServerName, s.ServerID))
if activateFunc != nil {
return activateFunc()
}
@ -1079,7 +1079,7 @@ func (s *Session) ForceActiveStandby(activateFunc func() error) error {
return err
}
s.updateStandby(false)
log.Info(fmt.Sprintf("serverName: %v quit STANDBY mode, this node will become ACTIVE", s.ServerName))
log.Info(fmt.Sprintf("serverName: %v quit STANDBY mode, this node will become ACTIVE, ID: %d", s.ServerName, s.ServerID))
if activateFunc != nil {
return activateFunc()
}