[skip ci] Add comment for getPartitionByID (#9892)

Signed-off-by: bigsheeper <yihao.dai@zilliz.com>
pull/9896/head
bigsheeper 2021-10-14 18:54:34 +08:00 committed by GitHub
parent d59bb7dd29
commit c92706c75d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 0 deletions

View File

@ -309,6 +309,7 @@ func (colReplica *collectionReplica) removePartitionPrivate(partitionID UniqueID
return nil return nil
} }
// getPartitionByID returns the partition which id is partitionID
func (colReplica *collectionReplica) getPartitionByID(partitionID UniqueID) (*Partition, error) { func (colReplica *collectionReplica) getPartitionByID(partitionID UniqueID) (*Partition, error) {
colReplica.mu.RLock() colReplica.mu.RLock()
defer colReplica.mu.RUnlock() defer colReplica.mu.RUnlock()