Hacktoberfest 2026:維護者為十月標記出來的 issue,仍然開放、適合新手。 瀏覽 Hacktoberfest issue

[JDBC] Implement DataSource login timeout

未關閉
#1,267 0 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視

還沒有人認領這個 Issue。

評估

難度
4/5
預估耗時
3-5 天
新手友好度
66/100
Issue 類型
功能
描述清晰度
基本清楚
活躍度
活躍
技術堆疊
java
領域
databases

研究方向

從 ArrowFlightJdbcDataSource.setLoginTimeout(int)、getLoginTimeout() 和 DataSource.getConnection() 路徑開始;將它們與現有的 connectTimeoutMs 行為進行比較。為預設值、setter/getter、逾時強制執行、SQLTimeoutException 以及部分建立資源的清理新增涵蓋範圍。完成的標準是,0 保留預設行為,非零登入逾時會取消失敗的嘗試且不會發生洩漏。

由索引模型根據 Issue 內容生成。

描述

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

主要語言
Java
星號
95
分支
154
平均合併
2 天 10 小時
30 天內合併 PR
11

貢獻指南

開啟貢獻指南

從這裡開始

  1. 先讀完整個 Issue,再讀專案的貢獻指南。
  2. 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
  3. Fork 儲存庫,在一個分支上完成修改。
  4. 送出 Pull Request,並在描述裡引用這個 Issue 編號。

apache/arrow-java 的其他 Issue

查看 apache/arrow-java 的全部 Issue

相似的 Issue

更多 Java Issue

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

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