mirror of
https://gitee.com/milvus-io/milvus.git
synced 2026-01-03 09:22:30 +08:00
Fix high cpu usage in singlenode
Signed-off-by: sunby <bingyi.sun@zilliz.com>
This commit is contained in:
parent
7ceb9e4a81
commit
f8e879b423
@ -93,8 +93,8 @@ func (c *client) Subscribe(options ConsumerOptions) (Consumer, error) {
|
||||
}
|
||||
|
||||
func consume(ctx context.Context, consumer *consumer) {
|
||||
for { //nolint:gosimple
|
||||
select { //nolint:gosimple
|
||||
for {
|
||||
select {
|
||||
case <-ctx.Done():
|
||||
log.Debug("client finished")
|
||||
return
|
||||
@ -126,7 +126,6 @@ func consume(ctx context.Context, consumer *consumer) {
|
||||
Payload: msg[0].Payload,
|
||||
}
|
||||
}
|
||||
default:
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user