Revert "core/bloombits: fix deadlock when matcher session hits an error (#28184)"

This reverts commit 0e3ba93dba.
This commit is contained in:
devopsbo3 2023-11-10 12:27:53 -06:00 committed by GitHub
parent 9bc056f9d6
commit de65527e85

View file

@ -630,16 +630,13 @@ func (s *MatcherSession) Multiplex(batch int, wait time.Duration, mux chan chan
request <- &Retrieval{Bit: bit, Sections: sections, Context: s.ctx} request <- &Retrieval{Bit: bit, Sections: sections, Context: s.ctx}
result := <-request result := <-request
// Deliver a result before s.Close() to avoid a deadlock
s.deliverSections(result.Bit, result.Sections, result.Bitsets)
if result.Error != nil { if result.Error != nil {
s.errLock.Lock() s.errLock.Lock()
s.err = result.Error s.err = result.Error
s.errLock.Unlock() s.errLock.Unlock()
s.Close() s.Close()
} }
s.deliverSections(result.Bit, result.Sections, result.Bitsets)
} }
} }
} }