From 90d69658d956e5827851e50d9b816dc914ff195d Mon Sep 17 00:00:00 2001 From: sunby Date: Mon, 8 Feb 2021 15:19:48 +0800 Subject: [PATCH] Fix master meta table bugs Signed-off-by: sunby --- internal/masterservice/meta_table.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/internal/masterservice/meta_table.go b/internal/masterservice/meta_table.go index a06d5dafc..73ce36f39 100644 --- a/internal/masterservice/meta_table.go +++ b/internal/masterservice/meta_table.go @@ -695,7 +695,7 @@ func (mt *metaTable) GetNotIndexedSegments(collName string, fieldName string, in func (mt *metaTable) GetIndexByName(collName string, fieldName string, indexName string) ([]pb.IndexInfo, error) { mt.ddLock.RLock() - mt.ddLock.RUnlock() + defer mt.ddLock.RUnlock() collID, ok := mt.collName2ID[collName] if !ok { @@ -746,7 +746,7 @@ func (mt *metaTable) GetIndexByName(collName string, fieldName string, indexName func (mt *metaTable) GetIndexByID(indexID typeutil.UniqueID) (*pb.IndexInfo, error) { mt.ddLock.RLock() - mt.ddLock.RUnlock() + defer mt.ddLock.RUnlock() indexInfo, ok := mt.indexID2Meta[indexID] if !ok { -- GitLab