mirror of https://github.com/milvus-io/milvus.git
parent
b04f08b0c4
commit
b22ab71222
|
@ -99,9 +99,11 @@ func (f *RmsFactory) NewTtMsgStream(ctx context.Context) (MsgStream, error) {
|
|||
}
|
||||
|
||||
func (f *RmsFactory) NewQueryMsgStream(ctx context.Context) (MsgStream, error) {
|
||||
InitMmq()
|
||||
|
||||
return NewMemMsgStream(ctx, f.ReceiveBufSize)
|
||||
rmqClient, err := mqclient.NewRmqClient(rocksmq.ClientOptions{Server: rocksmqserver.Rmq})
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return NewMqMsgStream(ctx, f.ReceiveBufSize, f.RmqBufSize, rmqClient, f.dispatcherFactory.NewUnmarshalDispatcher())
|
||||
}
|
||||
|
||||
func NewRmsFactory(rocksmqPath string) Factory {
|
||||
|
|
|
@ -451,16 +451,19 @@ func (mt *metaTable) GetCollectionBySegmentID(segID typeutil.UniqueID) (*pb.Coll
|
|||
func (mt *metaTable) ListCollections(ts typeutil.Timestamp) (map[string]typeutil.UniqueID, error) {
|
||||
mt.ddLock.RLock()
|
||||
defer mt.ddLock.RUnlock()
|
||||
colls := make(map[string]typeutil.UniqueID)
|
||||
|
||||
if ts == 0 {
|
||||
return mt.collName2ID, nil
|
||||
for k, v := range mt.collName2ID {
|
||||
colls[k] = v
|
||||
}
|
||||
return colls, nil
|
||||
}
|
||||
_, vals, err := mt.client.LoadWithPrefix(CollectionMetaPrefix, ts)
|
||||
if err != nil {
|
||||
log.Debug("load with prefix error", zap.Uint64("timestamp", ts), zap.Error(err))
|
||||
return nil, nil
|
||||
}
|
||||
colls := make(map[string]typeutil.UniqueID)
|
||||
for _, val := range vals {
|
||||
collMeta := pb.CollectionInfo{}
|
||||
err := proto.UnmarshalText(val, &collMeta)
|
||||
|
|
Loading…
Reference in New Issue