Fix data race in DataNode (#19470)

Signed-off-by: yah01 <yang.cen@zilliz.com>

Signed-off-by: yah01 <yang.cen@zilliz.com>
pull/19479/head
yah01 2022-09-27 15:16:55 +08:00 committed by GitHub
parent 2442335aa2
commit 9801c6dfc9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -907,8 +907,8 @@ func (replica *SegmentReplica) listNotFlushedSegmentIDs() []UniqueID {
// getSegmentStatslog returns the segment statslog for the provided segment id.
func (replica *SegmentReplica) getSegmentStatslog(segID UniqueID) ([]byte, error) {
replica.segMu.RLock()
defer replica.segMu.RUnlock()
colID := replica.getCollectionID()
replica.segMu.RUnlock()
schema, err := replica.getCollectionSchema(colID, 0)
if err != nil {