mirror of
https://gitee.com/milvus-io/milvus.git
synced 2025-12-07 17:48:29 +08:00
Remove sending newSegmentMsg to rootcoord (#6301)
Signed-off-by: sunby <bingyi.sun@zilliz.com>
This commit is contained in:
parent
972c44d82c
commit
836a45ec26
@ -73,7 +73,6 @@ type Server struct {
|
|||||||
|
|
||||||
kvClient *etcdkv.EtcdKV
|
kvClient *etcdkv.EtcdKV
|
||||||
meta *meta
|
meta *meta
|
||||||
segmentInfoStream msgstream.MsgStream
|
|
||||||
segmentManager Manager
|
segmentManager Manager
|
||||||
allocator allocator
|
allocator allocator
|
||||||
cluster *cluster
|
cluster *cluster
|
||||||
@ -155,10 +154,6 @@ func (s *Server) Start() error {
|
|||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
if err = s.initSegmentInfoChannel(); err != nil {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
|
|
||||||
s.allocator = newRootCoordAllocator(s.ctx, s.rootCoordClient)
|
s.allocator = newRootCoordAllocator(s.ctx, s.rootCoordClient)
|
||||||
|
|
||||||
s.startSegmentManager()
|
s.startSegmentManager()
|
||||||
@ -231,20 +226,7 @@ func (s *Server) loadDataNodes() []*datapb.DataNodeInfo {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (s *Server) startSegmentManager() {
|
func (s *Server) startSegmentManager() {
|
||||||
helper := createNewSegmentHelper(s.segmentInfoStream)
|
s.segmentManager = newSegmentManager(s.meta, s.allocator)
|
||||||
s.segmentManager = newSegmentManager(s.meta, s.allocator, withAllocHelper(helper))
|
|
||||||
}
|
|
||||||
|
|
||||||
func (s *Server) initSegmentInfoChannel() error {
|
|
||||||
var err error
|
|
||||||
s.segmentInfoStream, err = s.msFactory.NewMsgStream(s.ctx)
|
|
||||||
if err != nil {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
s.segmentInfoStream.AsProducer([]string{Params.SegmentInfoChannelName})
|
|
||||||
log.Debug("DataCoord AsProducer: " + Params.SegmentInfoChannelName)
|
|
||||||
s.segmentInfoStream.Start()
|
|
||||||
return nil
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (s *Server) initMeta() error {
|
func (s *Server) initMeta() error {
|
||||||
@ -501,7 +483,6 @@ func (s *Server) Stop() error {
|
|||||||
log.Debug("DataCoord server shutdown")
|
log.Debug("DataCoord server shutdown")
|
||||||
atomic.StoreInt64(&s.isServing, ServerStateStopped)
|
atomic.StoreInt64(&s.isServing, ServerStateStopped)
|
||||||
s.cluster.releaseSessions()
|
s.cluster.releaseSessions()
|
||||||
s.segmentInfoStream.Close()
|
|
||||||
s.stopServerLoop()
|
s.stopServerLoop()
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user