Skip to content

fix: Clean up leaked progress bars on session stop#186

Open
ajma wants to merge 1 commit intoGoogleCloudDataproc:mainfrom
ajma:fix/progress-bar-leak
Open

fix: Clean up leaked progress bars on session stop#186
ajma wants to merge 1 commit intoGoogleCloudDataproc:mainfrom
ajma:fix/progress-bar-leak

Conversation

@ajma
Copy link
Copy Markdown
Contributor

@ajma ajma commented Apr 7, 2026

_execution_progress_bar entries are only removed when operations complete with done=True. If operations are interrupted or fail before the handler is called with done=True, their tqdm objects leak. Now clears all remaining progress bars during stop().

_execution_progress_bar entries are only removed when operations complete
with done=True. If operations are interrupted or fail before the handler
is called with done=True, their tqdm objects leak. Now clears all
remaining progress bars during stop().
@ajma ajma requested a review from medb April 7, 2026 23:01
Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request introduces a cleanup mechanism for progress bars within the stop method of DataprocSparkSession to ensure resources are released during session termination. The review feedback suggests optimizing this by moving the progress bar closure logic outside of the global lock to reduce potential thread contention and improve performance.

@ajma ajma requested a review from dborowitz April 7, 2026 23:16
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.

1 participant