Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

[BUG] Failed archive extraction deletes the dataset cache

Open Beginner friendly
#4,674 0 comments 0 reactions 0 assignees View on GitHub

@dajiaohuang is already working on this.

Since Oct 23, 2026.

  • #4675 by @dajiaohuang — open

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
78/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
python
Domain
data

Research direction

Find _extract_archive and the download_file(..., extract=True) path used by the dataset loaders. Start by inspecting its extraction error handler and existing tests for archive failures; reproduce with a synthetic extractor that writes a partial file and raises tarfile.TarError. Done means the error still propagates while pre-existing destination contents survive and cleanup is limited to files created by that attempt.

Written by the indexing model from the issue text.

Description

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

  1. Put an existing sentinel file (or another cached dataset) in the extraction destination.
  2. Trigger an extraction failure after extraction has started (for example, a malformed or unextractable local archive).
  3. 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.

Dominant language
C++
Stars
3.6k
Forks
470
PR merge metrics
No merged PRs in 30d

Getting set up

Open in Codespaces

Starts the project's dev container in your browser, under your own GitHub account.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from alibaba/GraphScope

All issues in alibaba/GraphScope

Similar issues

More C++ issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.