Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion source/common/grpc/google_async_client_impl.cc
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,8 @@ void GoogleAsyncStreamImpl::resetStream() {
}

void GoogleAsyncStreamImpl::writeQueued() {
if (!call_initialized_ || finish_pending_ || write_pending_ || write_pending_queue_.empty()) {
if (!call_initialized_ || finish_pending_ || write_pending_ || write_pending_queue_.empty() ||

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This seems a legitimate change; we shouldn't be queueing new writes if we're draining for sure. Does this solve your teardown race for the Envoy gRPC client as well?

Trying to recall our earlier conversation, it seems we should get a clear teardown ordering. We should ensure that all the gRPC consumers are properly removed before we begin the TLS teardown.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Yes, it solves the test flakiness. tested with runs_per_test=1000.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

We could do that teardown ordering in a separate PR. We need to get this in to unblock CI tests.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

OK, I will merge given that you folks have ownership on the underlying issue. Thanks.

draining_cq_) {
return;
}
write_pending_ = true;
Expand Down