mirror of https://github.com/milvus-io/milvus.git
Set inMemoryPercentage to 0 when releasing partition (#7310)
Signed-off-by: bigsheeper <yihao.dai@zilliz.com>pull/7336/head
parent
0281bd8d22
commit
1e60cccaf9
|
@ -466,6 +466,14 @@ func (m *MetaReplica) releasePartition(collectionID UniqueID, partitionID Unique
|
|||
}
|
||||
releasedPartitionIDs = append(releasedPartitionIDs, partitionID)
|
||||
info.ReleasedPartitionIDs = releasedPartitionIDs
|
||||
|
||||
// If user loaded a collectionA, and release a partitionB which belongs to collectionA,
|
||||
// and then load collectionA again, if we don't set the inMemoryPercentage to 0 when releasing
|
||||
// partitionB, the second loading of collectionA would directly return because
|
||||
// the inMemoryPercentage in ShowCollection response is still the old value -- 100.
|
||||
// So if releasing partition, inMemoryPercentage should be set to 0.
|
||||
info.InMemoryPercentage = 0
|
||||
|
||||
err := saveGlobalCollectionInfo(collectionID, info, m.client)
|
||||
if err != nil {
|
||||
log.Error("save collectionInfo error", zap.Any("error", err.Error()), zap.Int64("collectionID", collectionID))
|
||||
|
|
|
@ -304,8 +304,8 @@ func (q *queryCollection) receiveQueryMsg(msg queryMsg) error {
|
|||
// zap.Int64("target collectionID", collectionID),
|
||||
// zap.Int64("msgID", msg.ID()),
|
||||
//)
|
||||
err := fmt.Errorf("not target collection query request, collectionID = %d, targetCollectionID = %d, msgID = %d", q.collectionID, collectionID, msg.ID())
|
||||
return err
|
||||
//err := fmt.Errorf("not target collection query request, collectionID = %d, targetCollectionID = %d, msgID = %d", q.collectionID, collectionID, msg.ID())
|
||||
return nil
|
||||
}
|
||||
|
||||
sp, ctx := trace.StartSpanFromContext(msg.TraceCtx())
|
||||
|
|
Loading…
Reference in New Issue