Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve snapshotting cleanup in parallel tests #1800

Merged
merged 5 commits into from
Jun 4, 2023
Merged

Conversation

gaborcsardi
Copy link
Member

@gaborcsardi gaborcsardi commented May 30, 2023

We cannot forward all work of the snapshot reporter to the main process, because expect_snapshot_helper() uses the return value of the take_snapshot() method. So this must be called in the subprocess.

This is also good for performance, because the snapshot comparison code still runs in the subprocess, and we don't copy potentially large objects between processes.

The disadvantage is that we need slightly more complicated reporters, both in the subprocess and in the main process, to make sure that both processes are doing the right type of snapshot cleanup.

Closes #1797.

Simplifies and improves #1788 and #1793.

For now, make it independent of whether it is parallel or not.
Remove unused snapshots correctly.
@gaborcsardi gaborcsardi requested a review from hadley May 30, 2023 12:00
@gaborcsardi gaborcsardi changed the title Simplify snapshot reporter w/ parallel = TRUE Improve snapshotting cleanup in parallel tests May 30, 2023
@hadley hadley added this to the 3.1.8 milestone May 31, 2023
@hadley hadley merged commit 496f827 into main Jun 4, 2023
@hadley hadley deleted the fix/parallel-snapshots branch June 4, 2023 14:33
@krlmlr krlmlr restored the fix/parallel-snapshots branch June 18, 2023 06:30
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.

Forward snapshotting file tracking from worker threads
2 participants