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

binder: Simplify ownership of ServerAuthInterceptor's executor. #11293

Merged
merged 6 commits into from
Jun 19, 2024

Conversation

jdcormie
Copy link
Member

@jdcormie jdcormie commented Jun 14, 2024

Allocating this executor before BinderServer even exists is convoluted and actually leaks if the built server is never actually start()ed. Instead, we have BinderServer own this executor directly, with a lifetime from start() until termination. Pass the executor to ServerAuthInterceptor via TransportAuthorizationState Attribute instead of at construction time.

Let BinderServer own this executor directly, between start() and
onTerminated(). Allocating it in BinderServerBuilder was convoluted and
leaked the Executor if the built server was never actually start()ed.
@jdcormie
Copy link
Member Author

@mateusazis

@jdcormie jdcormie changed the title binder: Simplify ownership of the AuthInterceptor's executor. binder: Simplify ownership of ServerAuthInterceptor's executor. Jun 15, 2024
@jdcormie jdcormie requested a review from ejona86 June 18, 2024 15:47
@jdcormie jdcormie merged commit 15ad9f5 into grpc:master Jun 19, 2024
13 checks passed
larry-safran pushed a commit to larry-safran/grpc-java that referenced this pull request Aug 13, 2024
…#11293)

Allocating this executor before BinderServer even exists is convoluted and actually leaks if the built server is never actually start()ed. Instead, have BinderServer own this executor directly, with a lifetime from start() until termination. Pass it to the ServerAuthInterceptor via TransportAuthorizationState Attribute instead of at construction time.
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 17, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants