[grpc][Gpr_To_Absl_Logging] Migrating from gpr to absl logging GPR_ASSERT (#36503)

[grpc][Gpr_To_Absl_Logging] Migrating from gpr to absl logging GPR_ASSERT
Replacing GPR_ASSERT with absl CHECK.
These changes have been made using string replacement and regex.
Will not be replacing all instances of CHECK with CHECK_EQ , CHECK_NE etc because there are too many callsites. Only ones which are doable using very simple regex with least chance of failure will be replaced.
Given that we have 5000+ instances of GPR_ASSERT to edit, Doing it manually is too much work for both the author and reviewer.

Closes #36503

COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/36503 from tanvi-jagtap:tjagtap_src_ext 8db99e5a44
PiperOrigin-RevId: 630429369
pull/36522/head
Tanvi Jagtap 9 months ago committed by Copybara-Service
parent eb034a1227
commit 2bc76d78af
  1. 1
      BUILD
  2. 9
      src/core/BUILD
  3. 5
      src/core/ext/filters/http/message_compress/compression_filter.cc
  4. 13
      src/core/ext/filters/stateful_session/stateful_session_filter.cc
  5. 3
      src/core/ext/gcp/metadata_query.cc
  6. 9
      src/core/ext/transport/chaotic_good/client/chaotic_good_connector.cc
  7. 3
      src/core/ext/transport/chaotic_good/client_transport.cc
  8. 9
      src/core/ext/transport/chaotic_good/frame.cc
  9. 11
      src/core/ext/transport/chaotic_good/server/chaotic_good_server.cc
  10. 9
      src/core/ext/transport/chaotic_good/server_transport.cc
  11. 1
      src/core/ext/transport/cronet/BUILD
  12. 23
      src/core/ext/transport/cronet/transport/cronet_api_phony.cc
  13. 13
      src/core/ext/transport/cronet/transport/cronet_transport.cc
  14. 6
      src/core/ext/transport/inproc/inproc_transport.cc
  15. 5
      src/core/ext/transport/inproc/legacy_inproc_transport.cc
  16. 3
      src/core/server/server_config_selector_filter.cc

@ -4247,6 +4247,7 @@ grpc_cc_library(
],
external_deps = [
"absl/base:core_headers",
"absl/log:check",
"absl/status",
"absl/status:statusor",
"absl/strings",

@ -3652,6 +3652,7 @@ grpc_cc_library(
],
external_deps = [
"absl/base:core_headers",
"absl/log:check",
"absl/status",
"absl/status:statusor",
"absl/types:optional",
@ -4763,6 +4764,7 @@ grpc_cc_library(
"ext/filters/stateful_session/stateful_session_service_config_parser.h",
],
external_deps = [
"absl/log:check",
"absl/status:statusor",
"absl/strings",
"absl/types:optional",
@ -6912,6 +6914,7 @@ grpc_cc_library(
"ext/transport/inproc/legacy_inproc_transport.h",
],
external_deps = [
"absl/log:check",
"absl/status",
"absl/status:statusor",
"absl/strings",
@ -6962,6 +6965,7 @@ grpc_cc_library(
"ext/transport/chaotic_good/frame.h",
],
external_deps = [
"absl/log:check",
"absl/random:bit_gen_ref",
"absl/status",
"absl/status:statusor",
@ -7035,6 +7039,7 @@ grpc_cc_library(
],
external_deps = [
"absl/functional:any_invocable",
"absl/log:check",
"absl/status",
"absl/status:statusor",
"absl/strings",
@ -7194,6 +7199,7 @@ grpc_cc_library(
external_deps = [
"absl/base:core_headers",
"absl/container:flat_hash_map",
"absl/log:check",
"absl/random",
"absl/random:bit_gen_ref",
"absl/status",
@ -7251,6 +7257,7 @@ grpc_cc_library(
"absl/base:core_headers",
"absl/container:flat_hash_map",
"absl/functional:any_invocable",
"absl/log:check",
"absl/random",
"absl/random:bit_gen_ref",
"absl/status",
@ -7582,6 +7589,7 @@ grpc_cc_library(
],
external_deps = [
"absl/container:flat_hash_map",
"absl/log:check",
"absl/random",
"absl/random:bit_gen_ref",
"absl/status",
@ -7646,6 +7654,7 @@ grpc_cc_library(
"ext/transport/chaotic_good/client/chaotic_good_connector.h",
],
external_deps = [
"absl/log:check",
"absl/random",
"absl/random:bit_gen_ref",
"absl/status",

@ -22,6 +22,7 @@
#include <memory>
#include <utility>
#include "absl/log/check.h"
#include "absl/status/status.h"
#include "absl/strings/str_cat.h"
#include "absl/strings/str_format.h"
@ -144,7 +145,7 @@ MessageHandle ChannelCompression::CompressMessage(
const size_t after_size = tmp.Length();
const float savings_ratio = 1.0f - static_cast<float>(after_size) /
static_cast<float>(before_size);
GPR_ASSERT(grpc_compression_algorithm_name(algorithm, &algo_name));
CHECK(grpc_compression_algorithm_name(algorithm, &algo_name));
gpr_log(GPR_INFO,
"Compressed[%s] %" PRIuPTR " bytes vs. %" PRIuPTR
" bytes (%.2f%% savings)",
@ -158,7 +159,7 @@ MessageHandle ChannelCompression::CompressMessage(
} else {
if (GRPC_TRACE_FLAG_ENABLED(grpc_compression_trace)) {
const char* algo_name;
GPR_ASSERT(grpc_compression_algorithm_name(algorithm, &algo_name));
CHECK(grpc_compression_algorithm_name(algorithm, &algo_name));
gpr_log(GPR_INFO,
"Algorithm '%s' enabled but decided not to compress. Input size: "
"%" PRIuPTR,

@ -27,6 +27,7 @@
#include <utility>
#include <vector>
#include "absl/log/check.h"
#include "absl/strings/escaping.h"
#include "absl/strings/match.h"
#include "absl/strings/str_cat.h"
@ -143,7 +144,7 @@ absl::string_view GetClusterToUse(
// Get cluster assigned by the XdsConfigSelector.
auto cluster_attribute =
service_config_call_data->GetCallAttribute<XdsClusterAttribute>();
GPR_ASSERT(cluster_attribute != nullptr);
CHECK_NE(cluster_attribute, nullptr);
auto current_cluster = cluster_attribute->cluster();
static constexpr absl::string_view kClusterPrefix = "cluster:";
// If prefix is not "cluster:", then we can't use cluster override.
@ -157,7 +158,7 @@ absl::string_view GetClusterToUse(
// Use cluster from the cookie if it is configured for the route.
auto route_data =
service_config_call_data->GetCallAttribute<XdsRouteStateAttribute>();
GPR_ASSERT(route_data != nullptr);
CHECK_NE(route_data, nullptr);
// Cookie cluster was not configured for route - use the one from the
// attribute
if (!route_data->HasClusterForRoute(cluster_from_cookie)) {
@ -202,7 +203,7 @@ bool IsConfiguredPath(absl::string_view configured_path,
// Check to see if the configured path matches the request path.
const Slice* path_slice =
client_initial_metadata.get_pointer(HttpPathMetadata());
GPR_ASSERT(path_slice != nullptr);
CHECK_NE(path_slice, nullptr);
absl::string_view path = path_slice->as_string_view();
// Matching criteria from
// https://www.rfc-editor.org/rfc/rfc6265#section-5.1.4.
@ -227,13 +228,13 @@ void StatefulSessionFilter::Call::OnClientInitialMetadata(
GetContext<
grpc_call_context_element>()[GRPC_CONTEXT_SERVICE_CONFIG_CALL_DATA]
.value);
GPR_ASSERT(service_config_call_data != nullptr);
CHECK_NE(service_config_call_data, nullptr);
auto* method_params = static_cast<StatefulSessionMethodParsedConfig*>(
service_config_call_data->GetMethodParsedConfig(
filter->service_config_parser_index_));
GPR_ASSERT(method_params != nullptr);
CHECK_NE(method_params, nullptr);
cookie_config_ = method_params->GetConfig(filter->index_);
GPR_ASSERT(cookie_config_ != nullptr);
CHECK_NE(cookie_config_, nullptr);
if (!cookie_config_->name.has_value() ||
!IsConfiguredPath(cookie_config_->path, md)) {
return;

@ -23,6 +23,7 @@
#include <memory>
#include <utility>
#include "absl/log/check.h"
#include "absl/status/status.h"
#include "absl/status/statusor.h"
#include "absl/strings/str_format.h"
@ -73,7 +74,7 @@ MetadataQuery::MetadataQuery(
GRPC_CLOSURE_INIT(&on_done_, OnDone, this, nullptr);
auto uri = URI::Create("http", std::move(metadata_server_name), attribute_,
{} /* query params */, "" /* fragment */);
GPR_ASSERT(uri.ok()); // params are hardcoded
CHECK(uri.ok()); // params are hardcoded
grpc_http_request request;
memset(&request, 0, sizeof(grpc_http_request));
grpc_http_header header = {const_cast<char*>("Metadata-Flavor"),

@ -18,6 +18,7 @@
#include <memory>
#include <utility>
#include "absl/log/check.h"
#include "absl/random/bit_gen_ref.h"
#include "absl/status/status.h"
#include "absl/status/statusor.h"
@ -78,7 +79,7 @@ ChaoticGoodConnector::ChaoticGoodConnector(
handshake_mgr_(std::make_shared<HandshakeManager>()) {}
ChaoticGoodConnector::~ChaoticGoodConnector() {
GPR_ASSERT(notify_ == nullptr);
CHECK_EQ(notify_, nullptr);
if (connect_activity_ != nullptr) {
connect_activity_.reset();
}
@ -224,7 +225,7 @@ void ChaoticGoodConnector::Connect(const Args& args, Result* result,
MutexLock lock(&mu_);
result_ = result;
if (is_shutdown_) {
GPR_ASSERT(notify_ == nullptr);
CHECK_EQ(notify_, nullptr);
ExecCtx::Run(DEBUG_LOCATION, notify,
GRPC_ERROR_CREATE("connector shutdown"));
return;
@ -235,7 +236,7 @@ void ChaoticGoodConnector::Connect(const Args& args, Result* result,
resolved_addr_ = EventEngine::ResolvedAddress(
reinterpret_cast<const sockaddr*>(args_.address->addr),
args_.address->len);
GPR_ASSERT(resolved_addr_.value().address() != nullptr);
CHECK_NE(resolved_addr_.value().address(), nullptr);
grpc_event_engine::experimental::EventEngine::OnConnectCallback on_connect =
[self = RefAsSubclass<ChaoticGoodConnector>()](
absl::StatusOr<std::unique_ptr<EventEngine::Endpoint>>
@ -299,7 +300,7 @@ void ChaoticGoodConnector::OnHandshakeDone(void* arg, grpc_error_handle error) {
}
}
if (args->endpoint != nullptr) {
GPR_ASSERT(grpc_event_engine::experimental::grpc_is_event_engine_endpoint(
CHECK(grpc_event_engine::experimental::grpc_is_event_engine_endpoint(
args->endpoint));
self->control_endpoint_ = PromiseEndpoint(
grpc_event_engine::experimental::

@ -21,6 +21,7 @@
#include <tuple>
#include <utility>
#include "absl/log/check.h"
#include "absl/random/bit_gen_ref.h"
#include "absl/random/random.h"
#include "absl/status/statusor.h"
@ -279,7 +280,7 @@ auto ChaoticGoodClientTransport::CallOutboundLoop(uint32_t stream_id,
message_length % aligned_bytes == 0
? 0
: aligned_bytes - message_length % aligned_bytes;
GPR_ASSERT((message_length + padding) % aligned_bytes == 0);
CHECK_EQ((message_length + padding) % aligned_bytes, 0u);
frame.message = FragmentMessage(std::move(message), padding,
message_length);
return send_fragment(std::move(frame));

@ -20,6 +20,7 @@
#include <limits>
#include <utility>
#include "absl/log/check.h"
#include "absl/status/status.h"
#include "absl/status/statusor.h"
@ -152,7 +153,7 @@ absl::StatusOr<Arena::PoolPtr<Metadata>> ReadMetadata(
Arena* arena) {
if (!maybe_slices.ok()) return maybe_slices.status();
auto& slices = *maybe_slices;
GPR_ASSERT(arena != nullptr);
CHECK_NE(arena, nullptr);
Arena::PoolPtr<Metadata> metadata = Arena::MakePooled<Metadata>();
parser->BeginFrame(
metadata.get(), std::numeric_limits<uint32_t>::max(),
@ -275,7 +276,7 @@ absl::Status ClientFragmentFrame::Deserialize(HPackParser* parser,
}
BufferPair ClientFragmentFrame::Serialize(HPackCompressor* encoder) const {
GPR_ASSERT(stream_id != 0);
CHECK_NE(stream_id, 0u);
FrameSerializer serializer(FrameType::kFragment, stream_id);
if (headers.get() != nullptr) {
encoder->EncodeRawHeaders(*headers.get(), serializer.AddHeaders());
@ -354,7 +355,7 @@ absl::Status ServerFragmentFrame::Deserialize(HPackParser* parser,
}
BufferPair ServerFragmentFrame::Serialize(HPackCompressor* encoder) const {
GPR_ASSERT(stream_id != 0);
CHECK_NE(stream_id, 0u);
FrameSerializer serializer(FrameType::kFragment, stream_id);
if (headers.get() != nullptr) {
encoder->EncodeRawHeaders(*headers.get(), serializer.AddHeaders());
@ -399,7 +400,7 @@ absl::Status CancelFrame::Deserialize(HPackParser*, const FrameHeader& header,
}
BufferPair CancelFrame::Serialize(HPackCompressor*) const {
GPR_ASSERT(stream_id != 0);
CHECK_NE(stream_id, 0u);
FrameSerializer serializer(FrameType::kCancel, stream_id);
return serializer.Finish();
}

@ -21,6 +21,7 @@
#include <utility>
#include <vector>
#include "absl/log/check.h"
#include "absl/random/bit_gen_ref.h"
#include "absl/status/status.h"
#include "absl/status/statusor.h"
@ -116,7 +117,7 @@ absl::StatusOr<int> ChaoticGoodServerListener::Bind(
StatusToString(status).c_str());
}
};
GPR_ASSERT(event_engine_ != nullptr);
CHECK_NE(event_engine_, nullptr);
auto ee_listener = event_engine_->CreateListener(
std::move(accept_cb), std::move(shutdown_cb),
grpc_event_engine::experimental::ChannelArgsEndpointConfig(args_),
@ -135,7 +136,7 @@ absl::StatusOr<int> ChaoticGoodServerListener::Bind(
}
absl::Status ChaoticGoodServerListener::StartListening() {
GPR_ASSERT(ee_listener_ != nullptr);
CHECK(ee_listener_ != nullptr);
auto status = ee_listener_->Start();
if (!status.ok()) {
gpr_log(GPR_ERROR, "Start listening failed: %s", status.ToString().c_str());
@ -384,7 +385,7 @@ auto ChaoticGoodServerListener::ActiveConnection::HandshakingState::
void ChaoticGoodServerListener::ActiveConnection::HandshakingState::
OnHandshakeDone(void* arg, grpc_error_handle error) {
auto* args = static_cast<HandshakerArgs*>(arg);
GPR_ASSERT(args != nullptr);
CHECK_NE(args, nullptr);
RefCountedPtr<HandshakingState> self(
static_cast<HandshakingState*>(args->user_data));
grpc_slice_buffer_destroy(args->read_buffer);
@ -398,7 +399,7 @@ void ChaoticGoodServerListener::ActiveConnection::HandshakingState::
self->connection_->Done("Server handshake done but has empty endpoint.");
return;
}
GPR_ASSERT(grpc_event_engine::experimental::grpc_is_event_engine_endpoint(
CHECK(grpc_event_engine::experimental::grpc_is_event_engine_endpoint(
args->endpoint));
auto ee_endpoint =
grpc_event_engine::experimental::grpc_take_wrapped_event_engine_endpoint(
@ -503,7 +504,7 @@ int grpc_server_add_chaotic_good_port(grpc_server* server, const char* addr) {
if (port_num == 0) {
port_num = bind_result.value();
} else {
GPR_ASSERT(port_num == bind_result.value());
CHECK(port_num == bind_result.value());
}
core_server->AddListener(std::move(listener));
}

@ -18,6 +18,7 @@
#include <string>
#include <tuple>
#include "absl/log/check.h"
#include "absl/random/bit_gen_ref.h"
#include "absl/random/random.h"
#include "absl/status/status.h"
@ -72,7 +73,7 @@ auto ChaoticGoodServerTransport::TransportWriteLoop(
auto ChaoticGoodServerTransport::PushFragmentIntoCall(
CallInitiator call_initiator, ClientFragmentFrame frame,
uint32_t stream_id) {
GPR_DEBUG_ASSERT(frame.headers == nullptr);
DCHECK(frame.headers == nullptr);
if (grpc_chaotic_good_trace.enabled()) {
gpr_log(GPR_INFO, "CHAOTIC_GOOD: PushFragmentIntoCall: frame=%s",
frame.ToString().c_str());
@ -167,7 +168,7 @@ auto ChaoticGoodServerTransport::SendCallBody(
message_length % aligned_bytes == 0
? 0
: aligned_bytes - message_length % aligned_bytes;
GPR_ASSERT((message_length + padding) % aligned_bytes == 0);
CHECK_EQ((message_length + padding) % aligned_bytes, 0u);
frame.message =
FragmentMessage(std::move(message), padding, message_length);
frame.stream_id = stream_id;
@ -381,8 +382,8 @@ ChaoticGoodServerTransport::ChaoticGoodServerTransport(
}
void ChaoticGoodServerTransport::SetAcceptor(Acceptor* acceptor) {
GPR_ASSERT(acceptor_ == nullptr);
GPR_ASSERT(acceptor != nullptr);
CHECK_EQ(acceptor_, nullptr);
CHECK_NE(acceptor, nullptr);
acceptor_ = acceptor;
got_acceptor_.Set();
}

@ -40,6 +40,7 @@ grpc_cc_library(
"transport/cronet_transport.h",
],
external_deps = [
"absl/log:check",
"cronet_c_for_grpc",
],
language = "c++",

@ -19,6 +19,7 @@
// This file has empty implementation of all the functions exposed by the cronet
// library, so we can build it in all environments
#include "absl/log/check.h"
#include "third_party/objective_c/Cronet/bidirectional_stream_c.h"
#include <grpc/support/log.h>
@ -31,12 +32,12 @@
bidirectional_stream* bidirectional_stream_create(
stream_engine* /*engine*/, void* /*annotation*/,
bidirectional_stream_callback* /*callback*/) {
GPR_ASSERT(0);
CHECK(0);
return nullptr;
}
int bidirectional_stream_destroy(bidirectional_stream* /*stream*/) {
GPR_ASSERT(0);
CHECK(0);
return 0;
}
@ -45,39 +46,35 @@ int bidirectional_stream_start(
const char* /*method*/,
const bidirectional_stream_header_array* /*headers*/,
bool /*end_of_stream*/) {
GPR_ASSERT(0);
CHECK(0);
return 0;
}
int bidirectional_stream_read(bidirectional_stream* /*stream*/,
char* /*buffer*/, int /*capacity*/) {
GPR_ASSERT(0);
CHECK(0);
return 0;
}
int bidirectional_stream_write(bidirectional_stream* /*stream*/,
const char* /*buffer*/, int /*count*/,
bool /*end_of_stream*/) {
GPR_ASSERT(0);
CHECK(0);
return 0;
}
void bidirectional_stream_cancel(bidirectional_stream* /*stream*/) {
GPR_ASSERT(0);
}
void bidirectional_stream_cancel(bidirectional_stream* /*stream*/) { CHECK(0); }
void bidirectional_stream_disable_auto_flush(bidirectional_stream* /*stream*/,
bool /*disable_auto_flush*/) {
GPR_ASSERT(0);
CHECK(0);
}
void bidirectional_stream_delay_request_headers_until_flush(
bidirectional_stream* /*stream*/, bool /*delay_headers_until_flush*/) {
GPR_ASSERT(0);
CHECK(0);
}
void bidirectional_stream_flush(bidirectional_stream* /*stream*/) {
GPR_ASSERT(0);
}
void bidirectional_stream_flush(bidirectional_stream* /*stream*/) { CHECK(0); }
#endif // GRPC_COMPILE_WITH_CRONET

@ -26,6 +26,7 @@
#include <string>
#include <utility>
#include "absl/log/check.h"
#include "absl/status/status.h"
#include "absl/strings/match.h"
#include "absl/strings/str_cat.h"
@ -412,7 +413,7 @@ static void execute_from_storage(stream_obj* s) {
gpr_mu_lock(&s->mu);
for (struct op_and_state* curr = s->storage.head; curr != nullptr;) {
CRONET_LOG(GPR_DEBUG, "calling op at %p. done = %d", curr, curr->done);
GPR_ASSERT(!curr->done);
CHECK(!curr->done);
enum e_op_result result = execute_stream_op(curr);
CRONET_LOG(GPR_DEBUG, "execute_stream_op[%p] returns %s", curr,
op_result_string(result));
@ -592,7 +593,7 @@ static void on_response_headers_received(
s->state.state_callback_received[OP_FAILED])) {
// Do an extra read to trigger on_succeeded() callback in case connection
// is closed
GPR_ASSERT(s->state.rs.length_field_received == false);
CHECK(s->state.rs.length_field_received == false);
read_grpc_header(s);
}
gpr_mu_unlock(&s->mu);
@ -794,7 +795,7 @@ class CronetMetadataEncoder {
value = grpc_slice_to_c_string(value_slice.c_slice());
}
CRONET_LOG(GPR_DEBUG, "header %s = %s", key, value);
GPR_ASSERT(count_ < capacity_);
CHECK_LT(count_, capacity_);
headers_[count_].key = key;
headers_[count_].value = value;
++count_;
@ -1057,8 +1058,8 @@ static enum e_op_result execute_stream_op(struct op_and_state* oas) {
CRONET_LOG(GPR_DEBUG, "running: %p OP_SEND_INITIAL_METADATA", oas);
// Start new cronet stream. It is destroyed in on_succeeded, on_canceled,
// on_failed
GPR_ASSERT(s->cbs == nullptr);
GPR_ASSERT(!stream_state->state_op_done[OP_SEND_INITIAL_METADATA]);
CHECK_EQ(s->cbs, nullptr);
CHECK(!stream_state->state_op_done[OP_SEND_INITIAL_METADATA]);
s->cbs =
bidirectional_stream_create(t->engine, s->curr_gs, &cronet_callbacks);
CRONET_LOG(GPR_DEBUG, "%p = bidirectional_stream_create()", s->cbs);
@ -1229,7 +1230,7 @@ static enum e_op_result execute_stream_op(struct op_and_state* oas) {
if (stream_state->rs.length_field > 0) {
stream_state->rs.read_buffer = static_cast<char*>(
gpr_malloc(static_cast<size_t>(stream_state->rs.length_field)));
GPR_ASSERT(stream_state->rs.read_buffer);
CHECK(stream_state->rs.read_buffer);
stream_state->rs.remaining_bytes = stream_state->rs.length_field;
stream_state->rs.received_bytes = 0;
CRONET_LOG(GPR_DEBUG, "bidirectional_stream_read(%p)", s->cbs);

@ -16,6 +16,8 @@
#include <atomic>
#include "absl/log/check.h"
#include <grpc/grpc.h>
#include <grpc/support/log.h>
#include <grpc/support/port_platform.h>
@ -152,8 +154,8 @@ class InprocClientTransport final : public ClientTransport {
bool UsePromiseBasedTransport() {
if (!IsPromiseBasedInprocTransportEnabled()) return false;
GPR_ASSERT(IsPromiseBasedClientCallEnabled());
GPR_ASSERT(IsPromiseBasedServerCallEnabled());
CHECK(IsPromiseBasedClientCallEnabled());
CHECK(IsPromiseBasedServerCallEnabled());
return true;
}

@ -27,6 +27,7 @@
#include <string>
#include <utility>
#include "absl/log/check.h"
#include "absl/status/status.h"
#include "absl/status/statusor.h"
#include "absl/strings/str_cat.h"
@ -1266,7 +1267,7 @@ grpc_channel* grpc_legacy_inproc_channel_create(grpc_server* server,
auto new_channel = grpc_core::ChannelCreate(
"inproc", client_args, GRPC_CLIENT_DIRECT_CHANNEL, client_transport);
if (!new_channel.ok()) {
GPR_ASSERT(!channel);
CHECK(!channel);
gpr_log(GPR_ERROR, "Failed to create client channel: %s",
grpc_core::StatusToString(error).c_str());
intptr_t integer;
@ -1284,7 +1285,7 @@ grpc_channel* grpc_legacy_inproc_channel_create(grpc_server* server,
channel = new_channel->release()->c_ptr();
}
} else {
GPR_ASSERT(!channel);
CHECK(!channel);
gpr_log(GPR_ERROR, "Failed to create server channel: %s",
grpc_core::StatusToString(error).c_str());
intptr_t integer;

@ -19,6 +19,7 @@
#include <utility>
#include "absl/base/thread_annotations.h"
#include "absl/log/check.h"
#include "absl/status/status.h"
#include "absl/status/statusor.h"
#include "absl/types/optional.h"
@ -119,7 +120,7 @@ ServerConfigSelectorFilter::ServerConfigSelectorFilter(
RefCountedPtr<ServerConfigSelectorProvider> server_config_selector_provider)
: server_config_selector_provider_(
std::move(server_config_selector_provider)) {
GPR_ASSERT(server_config_selector_provider_ != nullptr);
CHECK(server_config_selector_provider_ != nullptr);
auto server_config_selector_watcher =
std::make_unique<ServerConfigSelectorWatcher>(Ref());
auto config_selector = server_config_selector_provider_->Watch(

Loading…
Cancel
Save