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

[6.1.0]Remove usage of gRPC Context cancellation in the remote execution cli… #17438

Merged
merged 5 commits into from
Feb 9, 2023
Merged

[6.1.0]Remove usage of gRPC Context cancellation in the remote execution cli… #17438

merged 5 commits into from
Feb 9, 2023

Conversation

ShreeM01
Copy link
Contributor

@ShreeM01 ShreeM01 commented Feb 7, 2023

…ent.

The gRPC remote execution client frequently "converts" gRPC calls into ListenableFutures by setting a SettableFuture in the onCompleted or onError gRPC stub callbacks. If the future has direct executor callbacks, those callbacks will execute with the gRPC Context of the freshly completed call. That is problematic if the Context was canceled (canceling the call Context is good hygiene after completing a gRPC call), and the future callback goes to make further gRPC calls.

Therefore, this change removes all usage of gRPC Context cancellation. It would be nice if there was instead some way to avoid leaking Contexts between calls instead of having totally forswear Context cancellation. However, I can't see a good way to enforce proper isolation.

Fixes #17298.

Closes #17426.

PiperOrigin-RevId: 507730469
Change-Id: Iea74acad4592952700e41d34672f6478de509d5e

…ent.

The gRPC remote execution client frequently "converts" gRPC calls into `ListenableFuture`s by setting a `SettableFuture` in the `onCompleted` or `onError` gRPC stub callbacks. If the future has direct executor callbacks, those callbacks will execute with the gRPC Context of the freshly completed call. That is problematic if the `Context` was canceled (canceling the call `Context` is good hygiene after completing a gRPC call), and the future callback goes to make further gRPC calls.

Therefore, this change removes all usage of gRPC `Context` cancellation. It would be nice if there was instead some way to avoid leaking `Context`s between calls instead of having totally forswear `Context` cancellation. However, I can't see a good way to enforce proper isolation.

Fixes #17298.

Closes #17426.

PiperOrigin-RevId: 507730469
Change-Id: Iea74acad4592952700e41d34672f6478de509d5e
@ShreeM01 ShreeM01 requested a review from benjaminp February 7, 2023 19:46
@ShreeM01 ShreeM01 enabled auto-merge (squash) February 7, 2023 22:09
@sgowroji sgowroji added the team-Remote-Exec Issues and PRs for the Execution (Remote) team label Feb 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
team-Remote-Exec Issues and PRs for the Execution (Remote) team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants