We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
// 设置超时 deadline := time.Now().Add(time.Nanosecond * time.Duration(NumNanosecondsInAMillisecond*request.Timeout)) for shard := 0; shard < engine.initOptions.NumShards; shard++ { select { case rankerOutput := <-rankerReturnChannel: if !request.CountDocsOnly { for _, doc := range rankerOutput.docs { rankOutput = append(rankOutput, doc) } } numDocs += rankerOutput.numDocs case <-time.After(deadline.Sub(time.Now())): isTimeout = true break } }
如果设置了超时,而且确实是超时了,那么进入 下面那条case了,那么原来的rankerReturnChannel要返回的rankerOut就无法正常返回了,阻塞了,而且会影响下次search的结果会返回上次是结果
The text was updated successfully, but these errors were encountered:
No branches or pull requests
如果设置了超时,而且确实是超时了,那么进入 下面那条case了,那么原来的rankerReturnChannel要返回的rankerOut就无法正常返回了,阻塞了,而且会影响下次search的结果会返回上次是结果
The text was updated successfully, but these errors were encountered: