Skip to content

fix: clean randomized contraction checkpoints on failure - #895

Merged
SemyonSinchenko merged 1 commit into
graphframes:mainfrom
SauronShepherd:codex/randomized-contraction-checkpoint-cleanup
Aug 31, 2026
Merged

SemyonSinchenko merged 1 commit into
graphframes:mainfrom
SauronShepherd:codex/randomized-contraction-checkpoint-cleanup

Conversation

@SauronShepherd

Copy link
Copy Markdown
Contributor

What changes were proposed in this pull request?

Ensure that RandomizedContraction checkpoint directories are cleaned up on both successful and failed executions.

A scoped cleanup routine is now called from the normal completion path and from finally. Cleanup failures are logged without masking the original algorithm failure.

A regression test forces a failure after intermediate parquet materialization and verifies that no randomized-contraction-* directory remains.

Why are the changes needed?

If an intermediate Spark or filesystem operation fails, the current implementation can leave temporary checkpoint data behind. Repeated executions can therefore leak storage, especially when using remote object stores.

This addresses #894.

Validation

  • RandomizedContractionSuite on WSL with Java 11
  • 14 tests passed
  • 0 failed
  • 0 aborted
  • git diff --check passed

The change does not modify public APIs.

@SauronShepherd
SauronShepherd force-pushed the codex/randomized-contraction-checkpoint-cleanup branch 2 times, most recently from 43fd7fa to 01d14a4 Compare August 30, 2026 01:03
@SauronShepherd
SauronShepherd force-pushed the codex/randomized-contraction-checkpoint-cleanup branch from 01d14a4 to a4cc58d Compare August 30, 2026 01:27

@SemyonSinchenko SemyonSinchenko left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks for the contribution!

@SemyonSinchenko
SemyonSinchenko merged commit 77f5bcc into graphframes:main Aug 31, 2026
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants