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

[JDBC] Implement DataSource login timeout

Đang mở
#1,267 0 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ó
4/5
Thời gian dự kiến
3-5 ngày
Mức phù hợp với người mới
66/100
Loại issue
Tính năng
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
java
Lĩnh vực
databases

Hướng nghiên cứu

Bắt đầu với ArrowFlightJdbcDataSource.setLoginTimeout(int), getLoginTimeout() và đường đi của DataSource.getConnection(); so sánh chúng với hành vi connectTimeoutMs hiện có. Bổ sung độ bao phủ cho giá trị mặc định, setter/getter, việc thực thi timeout, SQLTimeoutException và việc dọn dẹp các tài nguyên được tạo một phần. Hoàn thành khi giá trị 0 giữ nguyên hành vi mặc định và các login timeout khác 0 hủy các lần thử bị lỗi mà không gây rò rỉ.

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

Mô tả

Describe the enhancement requested

ArrowFlightJdbcDataSource.setLoginTimeout(int) currently throws SQLFeatureNotSupportedException, and getLoginTimeout() always returns 0.

Implement the JDBC DataSource login-timeout contract:

  • Store and return the timeout configured for each ArrowFlightJdbcDataSource instance.
  • Apply a nonzero timeout to connection establishment through DataSource.getConnection().
  • Preserve the JDBC semantics of zero: use the default system timeout if one exists; otherwise, do not impose a timeout.
  • If the timeout expires, attempt to cancel the connection attempt and throw SQLTimeoutException.
  • Clean up any allocator, channel, or partially constructed client when the attempt is cancelled or times out.
  • Add tests for the default value, setter/getter behavior, timeout enforcement, exception type, and resource cleanup.

This is distinct from #494/#495. The existing connectTimeoutMs property configures Netty socket connection attempts; the JDBC login timeout applies to the overall database connection attempt exposed by DataSource.getConnection().

Context: #1027 and the follow-up discussion.

Related DriverManager work: https://github.com/apache/arrow-java/issues/1268

Ngôn ngữ chính
Java
Star
95
Fork
154
Merge trung bình
2 ngày 10 giờ
Pull request đã merge (30 ngày)
11

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

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 apache/arrow-java

Tất cả issue của apache/arrow-java

Issue tương tự

Thêm issue về Java

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.