Skip to content

Commit

Permalink
read keepAlive to avoid useless warning: 'lease keepalive response qu…
Browse files Browse the repository at this point in the history
…eue is full; dropping response send'

Signed-off-by: DengXiewei <[email protected]>
  • Loading branch information
igotcha committed Oct 9, 2023
1 parent 1d099ab commit c5387d6
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions database/kv/etcd/v3/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -420,6 +420,12 @@ func (c *Client) keepAliveKV(k string, v string) error {
return perrors.New("keep alive lease")
}

// read keepAlive to avoid useless warning: 'lease keepalive response queue is full; dropping response send'
go func() {
for range keepAlive {
}
}()

_, err = rawClient.Put(c.ctx, k, v, clientv3.WithLease(lease.ID))
return perrors.WithMessage(err, "put k/v with lease")
}
Expand Down

0 comments on commit c5387d6

Please sign in to comment.