Fix replicas info is not removed after release (#17111)

Signed-off-by: Congqi Xia <congqi.xia@zilliz.com>
pull/17134/head
congqixia 2022-05-19 20:05:57 +08:00 committed by GitHub
parent e05cfe194e
commit 599763d9bf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 0 deletions

View File

@ -529,6 +529,8 @@ func (m *MetaReplica) releaseCollection(collectionID UniqueID) error {
}
m.dmChannelMu.Unlock()
m.replicas.Remove(collection.ReplicaIds...)
return nil
}

View File

@ -122,6 +122,7 @@ func TestMetaFunc(t *testing.T) {
queryChannelInfos: map[UniqueID]*querypb.QueryChannelInfo{},
dmChannelInfos: map[string]*querypb.DmChannelWatchInfo{},
segmentsInfo: segmentsInfo,
replicas: NewReplicaInfos(),
}
meta.setKvClient(kv)
dmChannels := []string{"testDm1", "testDm2"}