Skip to content

Commit

Permalink
fix: Panic if ProcessActiveStandBy returns error (milvus-io#33369)
Browse files Browse the repository at this point in the history
milvus-io#33368

Signed-off-by: wayblink <[email protected]>
  • Loading branch information
wayblink authored Jun 19, 2024
1 parent 0294595 commit 5fac2fa
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions internal/datacoord/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -276,13 +276,13 @@ func (s *Server) Register() error {
err := s.session.ProcessActiveStandBy(s.activateFunc)
if err != nil {
log.Error("failed to activate standby datacoord server", zap.Error(err))
return
panic(err)
}

err = s.icSession.ForceActiveStandby(nil)
if err != nil {
log.Error("failed to force activate standby indexcoord server", zap.Error(err))
return
panic(err)
}
afterRegister()
}()
Expand Down
2 changes: 1 addition & 1 deletion internal/querycoordv2/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ func (s *Server) Register() error {
go func() {
if err := s.session.ProcessActiveStandBy(s.activateFunc); err != nil {
log.Error("failed to activate standby server", zap.Error(err))
return
panic(err)
}
afterRegister()
}()
Expand Down
2 changes: 1 addition & 1 deletion internal/rootcoord/root_coord.go
Original file line number Diff line number Diff line change
Expand Up @@ -280,7 +280,7 @@ func (c *Core) Register() error {
go func() {
if err := c.session.ProcessActiveStandBy(c.activateFunc); err != nil {
log.Warn("failed to activate standby rootcoord server", zap.Error(err))
return
panic(err)
}
afterRegister()
}()
Expand Down

0 comments on commit 5fac2fa

Please sign in to comment.