mirror of
https://gitee.com/milvus-io/milvus.git
synced 2024-11-29 18:38:44 +08:00
Fix memory leak in query node
Signed-off-by: xige-16 <xi.ge@zilliz.com>
This commit is contained in:
parent
18a9ffb617
commit
acdf8cc9e1
@ -111,6 +111,7 @@ func (colReplica *collectionReplicaImpl) removeCollection(collectionID UniqueID)
|
|||||||
if col.ID() == collectionID {
|
if col.ID() == collectionID {
|
||||||
for _, p := range *col.Partitions() {
|
for _, p := range *col.Partitions() {
|
||||||
for _, s := range *p.Segments() {
|
for _, s := range *p.Segments() {
|
||||||
|
deleteSegment(colReplica.segments[s.ID()])
|
||||||
delete(colReplica.segments, s.ID())
|
delete(colReplica.segments, s.ID())
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -202,6 +203,7 @@ func (colReplica *collectionReplicaImpl) removePartition(collectionID UniqueID,
|
|||||||
for _, p := range *collection.Partitions() {
|
for _, p := range *collection.Partitions() {
|
||||||
if p.Tag() == partitionTag {
|
if p.Tag() == partitionTag {
|
||||||
for _, s := range *p.Segments() {
|
for _, s := range *p.Segments() {
|
||||||
|
deleteSegment(colReplica.segments[s.ID()])
|
||||||
delete(colReplica.segments, s.ID())
|
delete(colReplica.segments, s.ID())
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
Reference in New Issue
Block a user