aio-libs / aio-libs/aiokafka

Closed connections are not refreshed in client.py _send

未关闭
#1,118 1 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
主要语言
Python
星标
1.4k
派生
269
平均合并
1 天 1 小时
30 天内合并 PR
6

描述

**Describe the bug**
[_get_conn](https://github.com/aio-libs/aiokafka/blob/master/aiokafka/client.py#L424) refreshes closed connections but [_send](https://github.com/aio-libs/aiokafka/blob/master/aiokafka/client.py#L515) doesn't use `_get_conn` so it will try to send data over a connections that got closed e.g. due to being idle for too long.

This results in
```
Error sending OffsetCommitRequest_v2 to node 11 [KafkaConnectionError: Connection at ... closed] -- marking coordinator dead
```
for our use case.

**Expected behaviour**
`_send` should refresh closed connections

**Environment**
- aiokafka version 0.12.0

贡献指南

打开贡献指南

评估

这个 Issue 还没有评估数据。

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。