Skip to content

Commit

Permalink
Fix potential long log (#19757)
Browse files Browse the repository at this point in the history
/kind improvement

Signed-off-by: Yuchen Gao <yuchen.gao@zilliz.com>

Signed-off-by: Yuchen Gao <yuchen.gao@zilliz.com>
  • Loading branch information
soothing-rain authored Oct 13, 2022
1 parent 5091a7f commit be4b018
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions internal/datacoord/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -294,12 +294,12 @@ func (s *Server) Init() error {
}

// Start initialize `Server` members and start loops, follow steps are taken:
// 1. initialize message factory parameters
// 2. initialize root coord client, meta, datanode cluster, segment info channel,
// allocator, segment manager
// 3. start service discovery and server loops, which includes message stream handler (segment statistics,datanode tt)
// datanodes etcd watch, etcd alive check and flush completed status check
// 4. set server state to Healthy
// 1. initialize message factory parameters
// 2. initialize root coord client, meta, datanode cluster, segment info channel,
// allocator, segment manager
// 3. start service discovery and server loops, which includes message stream handler (segment statistics,datanode tt)
// datanodes etcd watch, etcd alive check and flush completed status check
// 4. set server state to Healthy
func (s *Server) Start() error {
s.compactionHandler.start()
s.compactionTrigger.start()
Expand Down Expand Up @@ -600,7 +600,6 @@ func (s *Server) updateSegmentStatistics(stats []*datapb.SegmentStats) {
zap.Int64("segment ID", stat.GetSegmentID()),
zap.Int64("old value", s.meta.GetAllSegment(stat.GetSegmentID()).GetNumOfRows()),
zap.Int64("new value", stat.GetNumRows()),
zap.Any("seg info", s.meta.GetSegment(stat.GetSegmentID())),
)
}
s.meta.SetCurrentRows(stat.GetSegmentID(), stat.GetNumRows())
Expand Down Expand Up @@ -833,6 +832,7 @@ func (s *Server) initRootCoordClient() error {
// Stop do the Server finalize processes
// it checks the server status is healthy, if not, just quit
// if Server is healthy, set server state to stopped, release etcd session,
//
// stop message stream client and stop server loops
func (s *Server) Stop() error {
if !s.stateCode.CompareAndSwap(commonpb.StateCode_Healthy, commonpb.StateCode_Abnormal) {
Expand Down

0 comments on commit be4b018

Please sign in to comment.