WriteApi does not respect Ctrl+C / KeyboardInterrupt / SIGTERM
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 42/100
Hướng nghiên cứu
Bắt đầu với điểm vào client.write_api() và cách sử dụng InfluxDBClient được thể hiện trong influxdb_client/client/influxdb_client.py. Tái hiện trường hợp không có máy chủ, sau đó theo dõi api.exit trong lúc Ctrl+C hoặc SIGTERM; được xem là hoàn tất khi quá trình tắt tạo ra KeyboardInterrupt ngay lập tức thay vì chờ các lần thử lại hoàn tất.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Specifications
- Client Version: 1.48.0
- InfluxDB Version: 2.4.0
- Platform: Ubuntu 24.04
Code sample to reproduce problem
- Make sure there is no server running at the address below.
- Run the following program
import urllib3
from influxdb_client.client.influxdb_client import InfluxDBClient
from influxdb_client.client.write.point import Point
_RETRIES = urllib3.util.Retry(total=6, backoff_factor=0.8)
p = Point("dsjfsfd")
with InfluxDBClient("http://127.0.0.1:8086", org="fake", retries=_RETRIES) as client:
with client.write_api() as api:
api.write("mybucket", client.org, p)
- Wait a second or two to make sure at least one attempt has been made.
- Press Ctrl+C (or send a
SIGTERMthrough some other mechanism, egkillutility on linux)
Expected behavior
api.__exit__ should raise a KeyboardInterrupt exception immediately.
Actual behavior
Program is stuck running for several minutes inside api.__exit__. Until program is force killed using SIGKILL or all retries have been exhausted.
Additional info
I've also experimented with write_options=WriteOptions(max_close_wait=1000) but it does not help and it has the risk to affect the normal flow when user is not pressing Ctrl+C
- Ngôn ngữ chính
- Python
- Star
- 792
- Fork
- 186
- Merge trung bình
- 3 giờ 2 phút
- Pull request đã merge (30 ngày)
- 1
Hướng dẫn đóng góp
Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của influxdata/influxdb-client-python
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
influxdata/influxdb-client-python#613 · 7 bình luận ·
-
bug
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 65/100
-
Public symbols not properly exported with `py.typed` present — triggers Pylance/Pyright errors Đang mở
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 45/100
influxdata/influxdb-client-python#694 · 6 reaction ·
-
bug
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 30/100
influxdata/influxdb-client-python#693 · 2 bình luận · 1 reaction ·
-
Socks proxy support Đang mở
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 35/100
Tất cả issue của influxdata/influxdb-client-python
Issue tương tự
-
[Bug] reef-hermes tells me to resume with hermes --resume, which does not work from my shell Đang mởarea: harness bug status: needs-triage
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
Human-Agent-Society/reef#625 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 80/100
learningequality/kolibri#15351 · 2 bình luận ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
-
Name consistency Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
eellak/triplestore#65 · 1 bình luận ·