mirror of https://github.com/milvus-io/milvus.git
Add writernode client
Signed-off-by: zhenshan.cao <zhenshan.cao@zilliz.com>pull/4973/head^2
parent
0067e2d989
commit
ca34353e9b
|
@ -351,9 +351,9 @@ func (colReplica *collectionReplicaImpl) addSegment(segmentID UniqueID, partitio
|
|||
return err
|
||||
}
|
||||
|
||||
partition, err := colReplica.getPartitionByTag(collectionID, partitionTag)
|
||||
if err != nil {
|
||||
return err
|
||||
partition, err2 := colReplica.getPartitionByTag(collectionID, partitionTag)
|
||||
if err2 != nil {
|
||||
return err2
|
||||
}
|
||||
|
||||
colReplica.mu.Lock()
|
||||
|
|
|
@ -144,9 +144,9 @@ func (ss *searchService) receiveSearchMsg() {
|
|||
err := ss.search(msg)
|
||||
if err != nil {
|
||||
log.Println(err)
|
||||
err = ss.publishFailedSearchResult(msg, err.Error())
|
||||
if err != nil {
|
||||
log.Println("publish FailedSearchResult failed, error message: ", err)
|
||||
err2 := ss.publishFailedSearchResult(msg, err.Error())
|
||||
if err2 != nil {
|
||||
log.Println("publish FailedSearchResult failed, error message: ", err2)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -196,9 +196,9 @@ func (ss *searchService) doUnsolvedMsgSearch() {
|
|||
err := ss.search(msg)
|
||||
if err != nil {
|
||||
log.Println(err)
|
||||
err = ss.publishFailedSearchResult(msg, err.Error())
|
||||
if err != nil {
|
||||
log.Println("publish FailedSearchResult failed, error message: ", err)
|
||||
err2 := ss.publishFailedSearchResult(msg, err.Error())
|
||||
if err2 != nil {
|
||||
log.Println("publish FailedSearchResult failed, error message: ", err2)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -0,0 +1,32 @@
|
|||
package writerclient
|
||||
|
||||
import "github.com/zilliztech/milvus-distributed/internal/util/typeutil"
|
||||
|
||||
type UniqueID = typeutil.UniqueID
|
||||
|
||||
type Timestamp = typeutil.Timestamp
|
||||
|
||||
type Client struct {
|
||||
}
|
||||
|
||||
type SegmentDescription struct {
|
||||
SegmentID UniqueID
|
||||
IsClosed bool
|
||||
OpenTime Timestamp
|
||||
CloseTime Timestamp
|
||||
}
|
||||
|
||||
func (c *Client) FlushSegment(semgentID UniqueID) error {
|
||||
// push msg to pulsar channel
|
||||
return nil
|
||||
}
|
||||
|
||||
func (c *Client) DescribeSegment(semgentID UniqueID) (*SegmentDescription, error) {
|
||||
// query etcd
|
||||
return &SegmentDescription{}, nil
|
||||
}
|
||||
|
||||
func (c *Client) GetInsertBinlogPaths(semgentID UniqueID) (map[int32]string, error) {
|
||||
// query etcd
|
||||
return nil, nil
|
||||
}
|
Loading…
Reference in New Issue