[skip ci] Add comment for getCollectionNum (#9719)

Signed-off-by: bigsheeper <yihao.dai@zilliz.com>
pull/9743/head
bigsheeper 2021-10-12 19:05:17 +08:00 committed by GitHub
parent ba360d72e3
commit 8a4a232eff
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 0 deletions

View File

@ -204,6 +204,7 @@ func (colReplica *collectionReplica) hasCollectionPrivate(collectionID UniqueID)
return ok return ok
} }
// getCollectionNum returns num of collections in collectionReplica
func (colReplica *collectionReplica) getCollectionNum() int { func (colReplica *collectionReplica) getCollectionNum() int {
colReplica.mu.RLock() colReplica.mu.RLock()
defer colReplica.mu.RUnlock() defer colReplica.mu.RUnlock()