From 5c1abfa2ccad0b80b5f7f49487f331bcec934254 Mon Sep 17 00:00:00 2001 From: Jiquan Long Date: Sat, 7 Oct 2023 10:01:31 +0800 Subject: [PATCH] Print the server id when active-standby switch (#27119) Signed-off-by: longjiquan --- internal/util/sessionutil/session_util.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/internal/util/sessionutil/session_util.go b/internal/util/sessionutil/session_util.go index 545b7122ef..e0d923805f 100644 --- a/internal/util/sessionutil/session_util.go +++ b/internal/util/sessionutil/session_util.go @@ -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() }