Merge pull request #1989 from molecula/fb1266

[FB-1266] prevent concurrent map writes in openField
This commit is contained in:
seebs 2022-03-21 15:10:32 -05:00 • committed by GitHub
commit bac3360fa3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -341,7 +341,9 @@ func (i *Index) openField(mu *sync.Mutex, cfm *CreateFieldMessage, file string)
}
i.holder.Logger.Debugf("add field to index.fields: %s", file)
mu.Lock()
i.fields[fld.Name()] = fld
mu.Unlock()
return fld, nil
}