[JDBC] Implement DataSource login timeout
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
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
ArrowFlightJdbcDataSourceinstance. - 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
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 apache/arrow-java
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 74/100
apache/arrow-java#1261 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
apache/arrow-java#1236 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
apache/arrow-java#1230 ·
-
Type: bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 85/100
apache/arrow-java#1205 ·
-
Type: bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
apache/arrow-java#1196 · 1 bình luận ·
Tất cả issue của apache/arrow-java
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
elastic/gradle-plugins#157 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
cryptomator/hub#497 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
johanhaleby/occurrent#1120 ·