fix(search): BuildIndex concurrency error (#7035)

This commit is contained in:
Rammiah
2024-08-22 00:44:55 +08:00
committed by GitHub
parent 74887922b4
commit 48f50a2ceb
6 changed files with 55 additions and 22 deletions

View File

@ -57,5 +57,7 @@ func (mq *inMemoryMQ[T]) Clear() {
}
func (mq *inMemoryMQ[T]) Len() int {
mq.Lock()
defer mq.Unlock()
return mq.queue.Len()
}