[BUG] Failed archive extraction deletes the dataset cache
評価
調査の方向性
_extract_archive と、データセットローダーが使用する download_file(..., extract=True) の経路を見つけてください。まず、展開時のエラーハンドラーとアーカイブ失敗に関する既存のテストを調べます。一部のファイルを書き込んで tarfile.TarError を発生させる合成エクストラクターを使って再現してください。エラーが引き続き伝播し、宛先に以前から存在する内容が保持され、クリーンアップの対象がその試行で作成されたファイルに限られる状態になれば完了です。
索引モデルが issue の本文から書いたものです。
説明
Describe the bug
When archive extraction fails, _extract_archive removes the entire destination directory. The built-in dataset downloaders extract into the shared ~/.graphscope/datasets cache, so a TarError, RuntimeError, or KeyboardInterrupt during extraction can delete previously cached datasets and other files unrelated to the archive being extracted.
To Reproduce
- Put an existing sentinel file (or another cached dataset) in the extraction destination.
- Trigger an extraction failure after extraction has started (for example, a malformed or unextractable local archive).
- Observe that the error handler calls
shutil.rmtree(path)and removes the existing destination contents.
This behavior is also reproducible with a synthetic archive/extractor that writes a partial file and raises tarfile.TarError; no remote data or service is needed.
Expected behavior
A failed extraction should propagate its error without deleting pre-existing cache contents. Cleanup should be limited to files/directories created by that extraction attempt.
Environment (please complete the following information):
- GraphScope version: current
main - OS: behavior follows the shared cache extraction path; no live dataset or service was used for this report
Additional context
The built-in loaders call download_file(..., extract=True) with the common default cache_subdir="datasets", which makes the deletion affect cache entries beyond the failing archive. The target-local regression uses only synthetic files.
- 主要言語
- C++
- スター
- 3.6k
- フォーク
- 470
- PR マージ指標
- 30日以内にマージされた PR はありません
環境構築
このプロジェクトの開発コンテナを、あなたの GitHub アカウントでブラウザ上に起動します。
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
alibaba/GraphScope のほかの issue
-
stale
難易度 5/5 1週間以上 初心者へのやさしさ 25/100
alibaba/GraphScope#4655 · コメント 2 件 ·
-
stale
難易度 5/5 1週間以上 初心者へのやさしさ 38/100
alibaba/GraphScope#4654 · コメント 2 件 ·
-
stale
難易度 4/5 3〜5日 初心者へのやさしさ 45/100
alibaba/GraphScope#4647 · コメント 3 件 ·
-
stale
難易度 4/5 3〜5日 初心者へのやさしさ 30/100
alibaba/GraphScope#4639 · コメント 2 件 ·
-
stale
難易度 2/5 1〜3時間 初心者へのやさしさ 45/100
alibaba/GraphScope#4637 · コメント 1 件 ·
alibaba/GraphScope の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 85/100
OpenSpace/OpenSpace#4353 · コメント 1 件 ·
メンテナーはふだん 5 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
-
macOS: a double-click on a notarized altairsim is refused, and the docs give only the offline case対応中かも @anhaoXie が今日担当しました。 オープンdocumentation
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
mutationpp/Mutationpp#337 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
bulletphysics/bullet3#4819 ·