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

core: Added changes to make ServerImpl.internalClose() thread-safe #11924

Open
wants to merge 8 commits into
base: master
Choose a base branch
from

Conversation

vinodhabib
Copy link
Contributor

core: Added changes to make ServerImpl.internalClose thread-safe

Fixes: #3746

@vinodhabib vinodhabib marked this pull request as ready for review March 4, 2025 07:06
@vinodhabib
Copy link
Contributor Author

vinodhabib commented Mar 4, 2025

Created this new PR with required changes along with Review points fixes as part of Existing PR #11864 which needs to close as duplicate once this PR merged.

@vinodhabib vinodhabib marked this pull request as draft March 7, 2025 11:45
@vinodhabib vinodhabib marked this pull request as ready for review March 7, 2025 11:49
@@ -581,6 +586,7 @@ public void close(Status status, Metadata trailers) {
// clientStreamListener.closed can trigger clientStream.cancel (see code in
// ClientCalls.blockingUnaryCall), which may race with clientStream.serverClosed as both are
// calling internalCancel().
closeCalled = true;
Copy link
Contributor

Choose a reason for hiding this comment

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

Eric had commented that the stream implementation should handle whether close had already been called but this PR is doing it in the InProcessTransport.

Copy link
Contributor Author

@vinodhabib vinodhabib Mar 19, 2025

Choose a reason for hiding this comment

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

Fixed and moved the changes to AbstractServerStream

Copy link
Contributor

@kannanjgithub kannanjgithub left a comment

Choose a reason for hiding this comment

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

Needs work.

@vinodhabib
Copy link
Contributor Author

Needs work.

Fixed the Review comments and PR is Ready for your Re-review.

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.

Make ServerImpl's internalClose thread-safe
2 participants