mirror of https://github.com/milvus-io/milvus.git
parent
346366386a
commit
e97936ba1c
|
@ -1217,7 +1217,7 @@ func (node *ProxyNode) Retrieve(ctx context.Context, request *milvuspb.RetrieveR
|
||||||
zap.String("db", request.DbName),
|
zap.String("db", request.DbName),
|
||||||
zap.String("collection", request.CollectionName),
|
zap.String("collection", request.CollectionName),
|
||||||
zap.Any("partitions", request.PartitionNames),
|
zap.Any("partitions", request.PartitionNames),
|
||||||
zap.Any("len(Ids)", len(request.Ids.IdField.(*schemapb.IDs_IntId).IntId.Data)))
|
zap.Any("len(Ids)", len(rt.result.Ids.IdField.(*schemapb.IDs_IntId).IntId.Data)))
|
||||||
}()
|
}()
|
||||||
|
|
||||||
err = rt.WaitToFinish()
|
err = rt.WaitToFinish()
|
||||||
|
@ -1368,7 +1368,7 @@ func (node *ProxyNode) Query(ctx context.Context, request *milvuspb.QueryRequest
|
||||||
zap.String("db", retrieveRequest.DbName),
|
zap.String("db", retrieveRequest.DbName),
|
||||||
zap.String("collection", retrieveRequest.CollectionName),
|
zap.String("collection", retrieveRequest.CollectionName),
|
||||||
zap.Any("partitions", retrieveRequest.PartitionNames),
|
zap.Any("partitions", retrieveRequest.PartitionNames),
|
||||||
zap.Any("len(Ids)", len(retrieveRequest.Ids.IdField.(*schemapb.IDs_IntId).IntId.Data)))
|
zap.Any("len(Ids)", len(rt.result.Ids.IdField.(*schemapb.IDs_IntId).IntId.Data)))
|
||||||
}()
|
}()
|
||||||
|
|
||||||
err = rt.WaitToFinish()
|
err = rt.WaitToFinish()
|
||||||
|
|
|
@ -94,6 +94,12 @@ func (rc *retrieveCollection) getServiceableTime() Timestamp {
|
||||||
|
|
||||||
func (rc *retrieveCollection) setServiceableTime(t Timestamp) {
|
func (rc *retrieveCollection) setServiceableTime(t Timestamp) {
|
||||||
rc.serviceableTimeMutex.Lock()
|
rc.serviceableTimeMutex.Lock()
|
||||||
|
defer rc.serviceableTimeMutex.Unlock()
|
||||||
|
|
||||||
|
if t < rc.serviceableTime {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
gracefulTimeInMilliSecond := Params.GracefulTime
|
gracefulTimeInMilliSecond := Params.GracefulTime
|
||||||
if gracefulTimeInMilliSecond > 0 {
|
if gracefulTimeInMilliSecond > 0 {
|
||||||
gracefulTime := tsoutil.ComposeTS(gracefulTimeInMilliSecond, 0)
|
gracefulTime := tsoutil.ComposeTS(gracefulTimeInMilliSecond, 0)
|
||||||
|
@ -101,7 +107,6 @@ func (rc *retrieveCollection) setServiceableTime(t Timestamp) {
|
||||||
} else {
|
} else {
|
||||||
rc.serviceableTime = t
|
rc.serviceableTime = t
|
||||||
}
|
}
|
||||||
rc.serviceableTimeMutex.Unlock()
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (rc *retrieveCollection) waitNewTSafe() Timestamp {
|
func (rc *retrieveCollection) waitNewTSafe() Timestamp {
|
||||||
|
@ -128,7 +133,7 @@ func (rc *retrieveCollection) start() {
|
||||||
|
|
||||||
func (rc *retrieveCollection) register() {
|
func (rc *retrieveCollection) register() {
|
||||||
// register tSafe watcher and init watcher select case
|
// register tSafe watcher and init watcher select case
|
||||||
collection, err := rc.historicalReplica.getCollectionByID(rc.collectionID)
|
collection, err := rc.streamingReplica.getCollectionByID(rc.collectionID)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Error(err.Error())
|
log.Error(err.Error())
|
||||||
return
|
return
|
||||||
|
|
Loading…
Reference in New Issue