未验证 提交 b10c3618 编写于 作者: Z zhenshan.cao 提交者: GitHub

Fix bug: should use Lock instead of RLock (#14797)

Signed-off-by: Nzhenshan.cao <zhenshan.cao@zilliz.com>
上级 d9bc40c0
......@@ -122,6 +122,9 @@ test-proxy:
@echo "Running go unittests..."
go test -race -coverpkg=./... -coverprofile=profile.out -covermode=atomic -timeout 5m github.com/milvus-io/milvus/internal/proxy -v
test-datanode:
@echo "Running go unittests..."
go test -race -coverpkg=./... -coverprofile=profile.out -covermode=atomic -timeout 5m github.com/milvus-io/milvus/internal/datanode -v
test-querycoord:
@echo "Running go unittests..."
......
......@@ -471,8 +471,8 @@ func (replica *SegmentReplica) initPKBloomFilter(s *Segment, statsBinlogs []*dat
// listNewSegmentsStartPositions gets all *New Segments* start positions and
// transfer segments states from *New* to *Normal*.
func (replica *SegmentReplica) listNewSegmentsStartPositions() []*datapb.SegmentStartPosition {
replica.segMu.RLock()
defer replica.segMu.RUnlock()
replica.segMu.Lock()
defer replica.segMu.Unlock()
result := make([]*datapb.SegmentStartPosition, 0, len(replica.newSegments))
for id, seg := range replica.newSegments {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册