Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

fix: Watch thread deadlock on exit #1014

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

Merged
merged 3 commits into from
Feb 25, 2025
Merged

fix: Watch thread deadlock on exit #1014

merged 3 commits into from
Feb 25, 2025

Conversation

daniel-sanche
Copy link
Contributor

Fixes #985 (comment)

When tearing down the background watcher thread, it would cause lock re-entry in the Watch._closing lock, which meant the thread would deadlock, and not be cleaned up properly.

This PR prevents on_snapshot messages from propagating when the Watch instance is in the process of closing down

@daniel-sanche daniel-sanche requested review from a team as code owners February 1, 2025 00:39
@product-auto-label product-auto-label bot added the size: xs Pull request size is extra small. label Feb 1, 2025
@product-auto-label product-auto-label bot added the api: firestore Issues related to the googleapis/python-firestore API. label Feb 1, 2025
@product-auto-label product-auto-label bot added size: s Pull request size is small. and removed size: xs Pull request size is extra small. labels Feb 21, 2025
@daniel-sanche daniel-sanche merged commit c47677a into main Feb 25, 2025
22 checks passed
@daniel-sanche daniel-sanche deleted the fix_watch_deadlock branch February 25, 2025 18:01
gkevinzheng pushed a commit that referenced this pull request Apr 30, 2025
* fix: fix thread cleanup when destroying Watch instance

* added test for on_snapshot while closing
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: firestore Issues related to the googleapis/python-firestore API. size: s Pull request size is small.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Watch instances not getting garbage collected
3 participants
Morty Proxy This is a proxified and sanitized view of the page, visit original site.