[Backport][v1.73.x][Python Core][EventEngine] Fix Python reconnect issues: use iomgr backup poller when EE is disabled#39950
Merged
yashykt merged 1 commit intogrpc:v1.73.xfrom Jun 23, 2025
Conversation
…en EE is disabled (grpc#39894) Fix the issue with gRPC Python Client not recovering in certain situations: grpc#38290, grpc#39113, grpc#39631. --- This PR: - Keeps iomgr backup poller enabled on platforms that do not support that have EventEngine / POSIX poller disabled. - Fixes and hardens Python's reconnect_test. This fixes issues with Python Client recovery in certain cases when it falls back to the backup poller. Note that currently Python disables POSIX poller manually via `GRPC_PLATFORM_SUPPORTS_POSIX_POLLING` due to currently unresolved fork issue. Unlike grpc#39131, this change is meant to be tested and merged to master, and then backported to past branches with broken python client reconnect logic. However, once Event Engine fork support is fixed, Python will switch to it by removing `GRPC_DO_NOT_INSTANTIATE_POSIX_POLLER` from all builds. After that, the backup poller should not be needed for Python. With the updated test, the case with python relying on the backup poller is covered, and we should be able to detect issues with Python having to rely on in after switching to EE. Closes grpc#39894 COPYBARA_INTEGRATE_REVIEW=grpc#39894 from sergiitk:python-fix-reconnect 239b330 PiperOrigin-RevId: 773549056
yashykt
approved these changes
Jun 23, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Backport of #39894 to v1.73.x.
Fix the issue with gRPC Python Client not recovering in certain situations: #38290, #39113, #39631.
This PR:
This fixes issues with Python Client recovery in certain cases when it falls back to the backup poller. Note that currently Python disables POSIX poller manually via
GRPC_PLATFORM_SUPPORTS_POSIX_POLLINGdue to currently unresolved fork issue.Unlike #39131, this change is meant to be tested and merged to master, and then backported to past branches with broken python client reconnect logic.
However, once Event Engine fork support is fixed, Python will switch to it by removing
GRPC_DO_NOT_INSTANTIATE_POSIX_POLLERfrom all builds. After that, the backup poller should not be needed for Python. With the updated test, the case with python relying on the backup poller is covered, and we should be able to detect issues with Python having to rely on in after switching to EE.