mirror of https://github.com/milvus-io/milvus.git
Fix bug: should use Lock instead of RLock (#14797)
Signed-off-by: zhenshan.cao <zhenshan.cao@zilliz.com>pull/14799/head
parent
d9bc40c033
commit
b10c361822
3
Makefile
3
Makefile
|
@ -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 {
|
||||
|
|
Loading…
Reference in New Issue