[Core] TestAvroPartitionStatsHandler fails on Windows due to unclosed partition statistics scan

オープン 初心者向け
#18,938 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

@Ankitkj1999 がすでに取り組んでいます。

2026年11月14日 から。

  • #18939 @Ankitkj1999 による — オープン

評価

難易度
1/5
見積もり時間
1〜3時間
初心者へのやさしさ
82/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
java
領域
testing

調査の方向性

PartitionStatsHandlerTestBase.testCopyOnWriteDelete() から始めてください。このメソッドは、返された CloseableIterable を閉じずに testTable.newPartitionStatisticsScan().scan() を2回呼び出しています。同じベースクラス内の他のscan呼び出し付近で使われている try-with-resources のパターンに従ってください。両方のscanが閉じられ、TestAvroPartitionStatsHandler がWindows上でIOExceptionを出さずに一時ディレクトリをクリーンアップできれば完了です。

索引モデルが issue の本文から書いたものです。

説明

Apache Iceberg version

main (development)

Query engine

None

Please describe the bug 🐞

PartitionStatsHandlerTestBase.testCopyOnWriteDelete() performs two calls to testTable.newPartitionStatisticsScan().scan() without closing the resulting CloseableIterable.

Because the underlying Avro reader file descriptor remains open, on Windows the operating system locks the temporary metadata statistics files (partition-stats-1-....avro and partition-stats-3-....avro). When JUnit 5's @TempDir extension attempts to clean up the temporary directory during test teardown, it fails with:

\
TestAvroPartitionStatsHandler > testCopyOnWriteDelete() FAILED
java.io.IOException: Failed to delete temp directory C:\Users...\AppData\Local\Temp\junit-...\metadata\partition-stats-1-...avro
\\

Closing both scans in try-with-resources (consistent with other test methods in PartitionStatsHandlerTestBase such as lines 209, 287, and 444) releases the open file handles and resolves the failure.

主要言語
Java
スター
9.4k
フォーク
3.7k
平均マージ
2日 16時間
マージ済み PR(30日)
160

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

apache/iceberg のほかの issue

apache/iceberg の issue をすべて見る

似ている issue

Java の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。