aio-libs / aio-libs/aiokafka

Stopping multiple consumers in a short window freezes on GroupCoordinator._heartbeat_routine()

未關閉
#773 6 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視
主要語言
Python
星號
1.4k
分支
269
平均合併
1 天 1 小時
30 天內合併 PR
6

描述

**Describe the bug**
I have several hundred consumers all connected to the same singular topic with autocommit disabled. Each consumer is part of a unique individual group. When I call `AIOKafkaConsumer.stop()` on each of the consumers within a for loop the task doing the stopping eventually halts completely. When I probe into the task I find that it is stuck waiting on `GroupCoordinator._heartbeat_routine()` and it remains this way indefinitely.

```
wait_for=

# It also seems to happen with GroupCoordinator._commit_refresh_routine(), GroupCoordinator._commit_refresh_task and AIOKafkaClient._sync_task,
```

**Expected behaviour**
GroupCoordinator._heartbeat_routine() should not prevent `AIOKafkaConsumer.stop()` from completing.

**Environment (please complete the following information):**
- aiokafka version (`python -c "import aiokafka; print(aiokafka.__version__)"`): 0.7.1
- kafka-python version (`python -c "import kafka; print(kafka.__version__)"`): 2.0.2
- Kafka Broker version (`kafka-topics.sh --version`): 2.6.0
- Other information (Confluent Cloud version, etc.): Python 3.8.10

**Reproducible example**
```
```

貢獻指南

開啟貢獻指南

評估

這個 Issue 還沒有評估資料。

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。