Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

atexit doesn’t work properly in batch mode: "cannot schedule new futures after interpreter shutdown"

Đang mở
#644 5 bình luận 0 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Đánh giá

Độ khó
3/5
Thời gian dự kiến
1-2 ngày
Mức phù hợp với người mới
35/100
Loại issue
Lỗi
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Đình trệ
Công nghệ
python
Lĩnh vực
databases

Hướng nghiên cứu

Bắt đầu với reproducer Python được cung cấp và theo dõi vòng đời shutdown và atexit của batch write API. Tái hiện lỗi trên Ubuntu với các phiên bản client và InfluxDB đã nêu; được coi là hoàn tất khi batch item được xử lý mà không xảy ra lỗi interpreter-shutdown trước khi handler in "closing".

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

bug

Hello,

Specifications
  • Client Version: 1.41.0
  • InfluxDB Version: 2.7.5
  • Platform: Ubuntu 23.10
Code sample to reproduce problem
import atexit
from influxdb_client import InfluxDBClient, Point

influxdb = InfluxDBClient(url="...", token="...", org="...")

write_api = influxdb.write_api()


@atexit.register
def close():
    print("closing")
    write_api.close()
    influxdb.close()


write_api.write("<bucket>", record=Point("test_bf").field("test", 1))
Expected behavior

Expected output:

closing
Actual behavior

Actual output:

The batch item wasn't processed successfully because: cannot schedule new futures after interpreter shutdown
closing

As you can see the atexit handler is executed, but the error happens before.

Additional info

No response

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

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. 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.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của influxdata/influxdb-client-python

Tất cả issue của influxdata/influxdb-client-python

Issue tương tự

Thêm issue về Python

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.