fix(search): don't delete virtual folder while update indexes (close #2677)

This commit is contained in:
Noah Hsu
2022-12-11 14:59:58 +08:00
parent 1640f06e13
commit 5043815d48
4 changed files with 11 additions and 2 deletions

View File

@ -125,6 +125,11 @@ func (m *MapOf[K, V]) Load(key K) (value V, ok bool) {
return e.load()
}
func (m *MapOf[K, V]) Has(key K) bool {
_, ok := m.Load(key)
return ok
}
func (e *entry[V]) load() (value V, ok bool) {
p := atomic.LoadPointer(&e.p)
if p == nil || p == expunged {