Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/master' into pick_first_new_fix
Browse files Browse the repository at this point in the history
  • Loading branch information
markdroth committed Nov 18, 2024
2 parents 308f062 + 45dacbe commit 8bdef04
Show file tree
Hide file tree
Showing 66 changed files with 8,603 additions and 217 deletions.
2 changes: 1 addition & 1 deletion BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -2729,7 +2729,7 @@ grpc_cc_library(
"include/grpcpp/test/mock_stream.h",
"include/grpcpp/test/server_context_test_spouse.h",
],
visibility = ["@grpc:grpc++_test"],
visibility = ["@grpc:public"],
deps = [
"channel",
"grpc++",
Expand Down
1 change: 0 additions & 1 deletion bazel/grpc_build_system.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,6 @@ def _update_visibility(visibility):
"grpcpp_gcp_observability": PUBLIC,
"grpc_resolver_fake": PRIVATE,
"grpc++_public_hdrs": PUBLIC,
"grpc++_test": PRIVATE,
"http": PRIVATE,
"httpcli": PRIVATE,
"iomgr_internal_errqueue": PRIVATE,
Expand Down
1 change: 1 addition & 0 deletions build_autogenerated.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions src/core/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -894,6 +894,7 @@ grpc_cc_library(
"poll",
"promise_factory",
"//:gpr_platform",
"//:grpc_trace",
],
)

Expand Down Expand Up @@ -1264,8 +1265,10 @@ grpc_cc_library(
language = "c++",
deps = [
"activity",
"dump_args",
"poll",
"ref_counted",
"status_flag",
"wait_set",
"//:gpr",
"//:ref_counted_ptr",
Expand Down Expand Up @@ -8187,6 +8190,7 @@ grpc_cc_library(
"absl/random:bit_gen_ref",
"absl/status",
"absl/status:statusor",
"absl/cleanup",
"absl/types:optional",
"absl/types:variant",
],
Expand Down
2 changes: 1 addition & 1 deletion src/core/client_channel/client_channel.cc
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,7 @@ class ClientChannel::SubchannelWrapper::WatcherWrapper
<< subchannel_wrapper_.get() << " subchannel "
<< subchannel_wrapper_->subchannel_.get()
<< " watcher=" << watcher_.get()
<< "state=" << ConnectivityStateName(state) << " status=" << status;
<< " state=" << ConnectivityStateName(state) << " status=" << status;
absl::optional<absl::Cord> keepalive_throttling =
status.GetPayload(kKeepaliveThrottlingKey);
if (keepalive_throttling.has_value()) {
Expand Down
3 changes: 3 additions & 0 deletions src/core/ext/transport/chaotic_good/client_transport.cc
Original file line number Diff line number Diff line change
Expand Up @@ -237,6 +237,9 @@ void ChaoticGoodClientTransport::AbortWithError() {
ReleasableMutexLock lock(&mu_);
StreamMap stream_map = std::move(stream_map_);
stream_map_.clear();
state_tracker_.SetState(GRPC_CHANNEL_SHUTDOWN,
absl::UnavailableError("transport closed"),
"transport closed");
lock.Release();
for (const auto& pair : stream_map) {
auto call_handler = pair.second;
Expand Down
9 changes: 8 additions & 1 deletion src/core/ext/transport/chaotic_good/server_transport.cc
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
#include <string>
#include <tuple>

#include "absl/cleanup/cleanup.h"
#include "absl/log/check.h"
#include "absl/log/log.h"
#include "absl/random/bit_gen_ref.h"
Expand Down Expand Up @@ -440,6 +441,12 @@ absl::Status ChaoticGoodServerTransport::NewStream(

void ChaoticGoodServerTransport::PerformOp(grpc_transport_op* op) {
RefCountedPtr<Party> cancelled_party;
bool close_outgoing_frames = false;
auto cleanup = absl::MakeCleanup([&close_outgoing_frames, this]() {
if (close_outgoing_frames) {
outgoing_frames_.MarkClosed();
}
});
MutexLock lock(&mu_);
bool did_stuff = false;
if (op->start_connectivity_watch != nullptr) {
Expand All @@ -461,7 +468,7 @@ void ChaoticGoodServerTransport::PerformOp(grpc_transport_op* op) {
}
if (!op->goaway_error.ok() || !op->disconnect_with_error.ok()) {
cancelled_party = std::move(party_);
outgoing_frames_.MarkClosed();
close_outgoing_frames = true;
state_tracker_.SetState(GRPC_CHANNEL_SHUTDOWN,
absl::UnavailableError("transport closed"),
"transport closed");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -237,6 +237,9 @@ void ChaoticGoodClientTransport::AbortWithError() {
ReleasableMutexLock lock(&mu_);
StreamMap stream_map = std::move(stream_map_);
stream_map_.clear();
state_tracker_.SetState(GRPC_CHANNEL_SHUTDOWN,
absl::UnavailableError("transport closed"),
"transport closed");
lock.Release();
for (const auto& pair : stream_map) {
auto call_handler = pair.second;
Expand Down
Loading

0 comments on commit 8bdef04

Please sign in to comment.