Skip to content

Commit

Permalink
Sync c-core 1.65.1
Browse files Browse the repository at this point in the history
  • Loading branch information
HannahShiSFB committed Jul 18, 2024
1 parent 833773b commit 1c57040
Show file tree
Hide file tree
Showing 23 changed files with 81 additions and 79 deletions.
2 changes: 1 addition & 1 deletion gRPC-C++.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
Pod::Spec.new do |s|
s.name = 'gRPC-C++'
# TODO (mxyan): use version that match gRPC version when pod is stabilized
version = '1.65.0'
version = '1.65.1'
s.version = version
s.summary = 'gRPC C++ library'
s.homepage = 'https://grpc.io'
Expand Down
2 changes: 1 addition & 1 deletion gRPC-Core.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@

Pod::Spec.new do |s|
s.name = 'gRPC-Core'
version = '1.65.0'
version = '1.65.1'
s.version = version
s.summary = 'Core cross-platform gRPC library, written in C'
s.homepage = 'https://grpc.io'
Expand Down
2 changes: 1 addition & 1 deletion gRPC-ProtoRPC.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@

Pod::Spec.new do |s|
s.name = 'gRPC-ProtoRPC'
version = '1.65.0'
version = '1.65.1'
s.version = version
s.summary = 'RPC library for Protocol Buffers, based on gRPC'
s.homepage = 'https://grpc.io'
Expand Down
2 changes: 1 addition & 1 deletion gRPC-RxLibrary.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@

Pod::Spec.new do |s|
s.name = 'gRPC-RxLibrary'
version = '1.65.0'
version = '1.65.1'
s.version = version
s.summary = 'Reactive Extensions library for iOS/OSX.'
s.homepage = 'https://grpc.io'
Expand Down
2 changes: 1 addition & 1 deletion gRPC.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@

Pod::Spec.new do |s|
s.name = 'gRPC'
version = '1.65.0'
version = '1.65.1'
s.version = version
s.summary = 'gRPC client library for iOS/OSX'
s.homepage = 'https://grpc.io'
Expand Down
4 changes: 2 additions & 2 deletions include/grpcpp/version_info.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@

#define GRPC_CPP_VERSION_MAJOR 1
#define GRPC_CPP_VERSION_MINOR 65
#define GRPC_CPP_VERSION_PATCH 0
#define GRPC_CPP_VERSION_PATCH 1
#define GRPC_CPP_VERSION_TAG ""
#define GRPC_CPP_VERSION_STRING "1.65.0"
#define GRPC_CPP_VERSION_STRING "1.65.1"

#endif // GRPCPP_VERSION_INFO_H
4 changes: 2 additions & 2 deletions src/core/ext/transport/inproc/inproc_transport.cc
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,8 @@ class InprocServerTransport final : public ServerTransport {
void SetPollset(grpc_stream*, grpc_pollset*) override {}
void SetPollsetSet(grpc_stream*, grpc_pollset_set*) override {}
void PerformOp(grpc_transport_op* op) override {
gpr_log(GPR_INFO, "inproc server op: %s",
grpc_transport_op_string(op).c_str());
GRPC_TRACE_LOG(inproc, INFO)
<< "inproc server op: " << grpc_transport_op_string(op);
if (op->start_connectivity_watch != nullptr) {
MutexLock lock(&state_tracker_mu_);
state_tracker_.AddWatcher(op->start_connectivity_watch_state,
Expand Down
4 changes: 2 additions & 2 deletions src/core/handshaker/http_connect/http_connect_handshaker.cc
Original file line number Diff line number Diff line change
Expand Up @@ -330,8 +330,8 @@ void HttpConnectHandshaker::DoHandshake(grpc_tcp_server_acceptor* /*acceptor*/,
// Log connection via proxy.
std::string proxy_name(grpc_endpoint_get_peer(args->endpoint));
std::string server_name_string(*server_name);
gpr_log(GPR_INFO, "Connecting to server %s via HTTP proxy %s",
server_name_string.c_str(), proxy_name.c_str());
VLOG(2) << "Connecting to server " << server_name_string << " via HTTP proxy "
<< proxy_name;
// Construct HTTP CONNECT request.
grpc_http_request request;
request.method = const_cast<char*>("CONNECT");
Expand Down
3 changes: 2 additions & 1 deletion src/core/lib/event_engine/posix_engine/ev_epoll1_linux.cc
Original file line number Diff line number Diff line change
Expand Up @@ -356,7 +356,8 @@ Epoll1Poller::Epoll1Poller(Scheduler* scheduler)
wakeup_fd_ = *CreateWakeupFd();
CHECK(wakeup_fd_ != nullptr);
CHECK_GE(g_epoll_set_.epfd, 0);
LOG(INFO) << "grpc epoll fd: " << g_epoll_set_.epfd;
GRPC_TRACE_LOG(event_engine_poller, INFO)
<< "grpc epoll fd: " << g_epoll_set_.epfd;
struct epoll_event ev;
ev.events = static_cast<uint32_t>(EPOLLIN | EPOLLET);
ev.data.ptr = wakeup_fd_.get();
Expand Down
7 changes: 5 additions & 2 deletions src/core/lib/event_engine/posix_engine/tcp_socket_utils.cc
Original file line number Diff line number Diff line change
Expand Up @@ -627,12 +627,15 @@ void PosixSocketWrapper::TrySetSocketTcpUserTimeout(
// if it is available.
if (g_socket_supports_tcp_user_timeout.load() == 0) {
if (0 != getsockopt(fd_, IPPROTO_TCP, TCP_USER_TIMEOUT, &newval, &len)) {
// This log is intentionally not protected behind a flag, so that users
// know that TCP_USER_TIMEOUT is not being used.
LOG(INFO) << "TCP_USER_TIMEOUT is not available. TCP_USER_TIMEOUT "
"won't be used thereafter";
g_socket_supports_tcp_user_timeout.store(-1);
} else {
LOG(INFO) << "TCP_USER_TIMEOUT is available. TCP_USER_TIMEOUT will be "
"used thereafter";
GRPC_TRACE_LOG(tcp, INFO)
<< "TCP_USER_TIMEOUT is available. TCP_USER_TIMEOUT will be "
"used thereafter";
g_socket_supports_tcp_user_timeout.store(1);
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,6 @@ void WorkStealingThreadPool::WorkStealingThreadPoolImpl::StartThread() {
}

void WorkStealingThreadPool::WorkStealingThreadPoolImpl::Quiesce() {
LOG(INFO) << "WorkStealingThreadPoolImpl::Quiesce";
SetShutdown(true);
// Wait until all threads have exited.
// Note that if this is a threadpool thread then we won't exit this thread
Expand Down
2 changes: 1 addition & 1 deletion src/core/lib/experiments/experiments.cc
Original file line number Diff line number Diff line change
Expand Up @@ -501,7 +501,7 @@ const ExperimentMetadata g_experiment_metadata[] = {
additional_constraints_work_serializer_clears_time_cache, nullptr, 0, true,
true},
{"work_serializer_dispatch", description_work_serializer_dispatch,
additional_constraints_work_serializer_dispatch, nullptr, 0, true, true},
additional_constraints_work_serializer_dispatch, nullptr, 0, false, true},
};

} // namespace grpc_core
Expand Down
3 changes: 1 addition & 2 deletions src/core/lib/experiments/experiments.h
Original file line number Diff line number Diff line change
Expand Up @@ -158,8 +158,7 @@ inline bool IsTraceRecordCallopsEnabled() { return true; }
inline bool IsUnconstrainedMaxQuotaBufferSizeEnabled() { return false; }
#define GRPC_EXPERIMENT_IS_INCLUDED_WORK_SERIALIZER_CLEARS_TIME_CACHE
inline bool IsWorkSerializerClearsTimeCacheEnabled() { return true; }
#define GRPC_EXPERIMENT_IS_INCLUDED_WORK_SERIALIZER_DISPATCH
inline bool IsWorkSerializerDispatchEnabled() { return true; }
inline bool IsWorkSerializerDispatchEnabled() { return false; }
#endif

#else
Expand Down
60 changes: 30 additions & 30 deletions src/core/lib/gprpp/dual_ref_counted.h
Original file line number Diff line number Diff line change
Expand Up @@ -93,9 +93,9 @@ class DualRefCounted : public Impl {
#ifndef NDEBUG
const uint32_t weak_refs = GetWeakRefs(prev_ref_pair);
if (trace_ != nullptr) {
LOG(INFO) << trace_ << ":" << this << " unref " << strong_refs << " -> "
<< strong_refs - 1 << ", weak_ref " << weak_refs << " -> "
<< weak_refs + 1;
VLOG(2) << trace_ << ":" << this << " unref " << strong_refs << " -> "
<< strong_refs - 1 << ", weak_ref " << weak_refs << " -> "
<< weak_refs + 1;
}
CHECK_GT(strong_refs, 0u);
#endif
Expand All @@ -112,10 +112,10 @@ class DualRefCounted : public Impl {
#ifndef NDEBUG
const uint32_t weak_refs = GetWeakRefs(prev_ref_pair);
if (trace_ != nullptr) {
LOG(INFO) << trace_ << ":" << this << " " << location.file() << ":"
<< location.line() << " unref " << strong_refs << " -> "
<< strong_refs - 1 << ", weak_ref " << weak_refs << " -> "
<< weak_refs + 1 << ") " << reason;
VLOG(2) << trace_ << ":" << this << " " << location.file() << ":"
<< location.line() << " unref " << strong_refs << " -> "
<< strong_refs - 1 << ", weak_ref " << weak_refs << " -> "
<< weak_refs + 1 << ") " << reason;
}
CHECK_GT(strong_refs, 0u);
#else
Expand All @@ -137,9 +137,9 @@ class DualRefCounted : public Impl {
#ifndef NDEBUG
const uint32_t weak_refs = GetWeakRefs(prev_ref_pair);
if (trace_ != nullptr) {
LOG(INFO) << trace_ << ":" << this << " ref_if_non_zero " << strong_refs
<< " -> " << strong_refs + 1 << " (weak_refs=" << weak_refs
<< ")";
VLOG(2) << trace_ << ":" << this << " ref_if_non_zero " << strong_refs
<< " -> " << strong_refs + 1 << " (weak_refs=" << weak_refs
<< ")";
}
#endif
if (strong_refs == 0) return nullptr;
Expand All @@ -156,10 +156,10 @@ class DualRefCounted : public Impl {
#ifndef NDEBUG
const uint32_t weak_refs = GetWeakRefs(prev_ref_pair);
if (trace_ != nullptr) {
LOG(INFO) << trace_ << ":" << this << " " << location.file() << ":"
<< location.line() << " ref_if_non_zero " << strong_refs
<< " -> " << strong_refs + 1 << " (weak_refs=" << weak_refs
<< ") " << reason;
VLOG(2) << trace_ << ":" << this << " " << location.file() << ":"
<< location.line() << " ref_if_non_zero " << strong_refs
<< " -> " << strong_refs + 1 << " (weak_refs=" << weak_refs
<< ") " << reason;
}
#else
// Avoid unused-parameter warnings for debug-only parameters
Expand Down Expand Up @@ -214,8 +214,8 @@ class DualRefCounted : public Impl {
const uint32_t weak_refs = GetWeakRefs(prev_ref_pair);
const uint32_t strong_refs = GetStrongRefs(prev_ref_pair);
if (trace != nullptr) {
LOG(INFO) << trace << ":" << this << " weak_unref " << weak_refs << " -> "
<< weak_refs - 1 << " (refs=" << strong_refs << ")";
VLOG(2) << trace << ":" << this << " weak_unref " << weak_refs << " -> "
<< weak_refs - 1 << " (refs=" << strong_refs << ")";
}
CHECK_GT(weak_refs, 0u);
#endif
Expand All @@ -236,9 +236,9 @@ class DualRefCounted : public Impl {
const uint32_t weak_refs = GetWeakRefs(prev_ref_pair);
const uint32_t strong_refs = GetStrongRefs(prev_ref_pair);
if (trace != nullptr) {
LOG(INFO) << trace << ":" << this << " " << location.file() << ":"
<< location.line() << " weak_unref " << weak_refs << " -> "
<< weak_refs - 1 << " (refs=" << strong_refs << ") " << reason;
VLOG(2) << trace << ":" << this << " " << location.file() << ":"
<< location.line() << " weak_unref " << weak_refs << " -> "
<< weak_refs - 1 << " (refs=" << strong_refs << ") " << reason;
}
CHECK_GT(weak_refs, 0u);
#else
Expand Down Expand Up @@ -301,8 +301,8 @@ class DualRefCounted : public Impl {
const uint32_t weak_refs = GetWeakRefs(prev_ref_pair);
CHECK_NE(strong_refs, 0u);
if (trace_ != nullptr) {
LOG(INFO) << trace_ << ":" << this << " ref " << strong_refs << " -> "
<< strong_refs + 1 << "; (weak_refs=" << weak_refs << ")";
VLOG(2) << trace_ << ":" << this << " ref " << strong_refs << " -> "
<< strong_refs + 1 << "; (weak_refs=" << weak_refs << ")";
}
#else
refs_.fetch_add(MakeRefPair(1, 0), std::memory_order_relaxed);
Expand All @@ -316,10 +316,10 @@ class DualRefCounted : public Impl {
const uint32_t weak_refs = GetWeakRefs(prev_ref_pair);
CHECK_NE(strong_refs, 0u);
if (trace_ != nullptr) {
LOG(INFO) << trace_ << ":" << this << " " << location.file() << ":"
<< location.line() << " ref " << strong_refs << " -> "
<< strong_refs + 1 << " (weak_refs=" << weak_refs << ") "
<< reason;
VLOG(2) << trace_ << ":" << this << " " << location.file() << ":"
<< location.line() << " ref " << strong_refs << " -> "
<< strong_refs + 1 << " (weak_refs=" << weak_refs << ") "
<< reason;
}
#else
// Use conditionally-important parameters
Expand All @@ -336,8 +336,8 @@ class DualRefCounted : public Impl {
const uint32_t strong_refs = GetStrongRefs(prev_ref_pair);
const uint32_t weak_refs = GetWeakRefs(prev_ref_pair);
if (trace_ != nullptr) {
LOG(INFO) << trace_ << ":" << this << " weak_ref " << weak_refs << " -> "
<< weak_refs + 1 << "; (refs=" << strong_refs << ")";
VLOG(2) << trace_ << ":" << this << " weak_ref " << weak_refs << " -> "
<< weak_refs + 1 << "; (refs=" << strong_refs << ")";
}
if (strong_refs == 0) CHECK_NE(weak_refs, 0u);
#else
Expand All @@ -352,9 +352,9 @@ class DualRefCounted : public Impl {
const uint32_t strong_refs = GetStrongRefs(prev_ref_pair);
const uint32_t weak_refs = GetWeakRefs(prev_ref_pair);
if (trace_ != nullptr) {
LOG(INFO) << trace_ << ":" << this << " " << location.file() << ":"
<< location.line() << " weak_ref " << weak_refs << " -> "
<< weak_refs + 1 << " (refs=" << strong_refs << ") " << reason;
VLOG(2) << trace_ << ":" << this << " " << location.file() << ":"
<< location.line() << " weak_ref " << weak_refs << " -> "
<< weak_refs + 1 << " (refs=" << strong_refs << ") " << reason;
}
if (strong_refs == 0) CHECK_NE(weak_refs, 0u);
#else
Expand Down
2 changes: 1 addition & 1 deletion src/core/lib/iomgr/ev_epoll1_linux.cc
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ static bool epoll_set_init() {
return false;
}

gpr_log(GPR_INFO, "grpc epoll fd: %d", g_epoll_set.epfd);
GRPC_TRACE_LOG(polling, INFO) << "grpc epoll fd: " << g_epoll_set.epfd;
gpr_atm_no_barrier_store(&g_epoll_set.num_events, 0);
gpr_atm_no_barrier_store(&g_epoll_set.cursor, 0);
return true;
Expand Down
33 changes: 16 additions & 17 deletions src/core/lib/iomgr/socket_utils_common_posix.cc
Original file line number Diff line number Diff line change
Expand Up @@ -374,22 +374,21 @@ grpc_error_handle grpc_set_socket_tcp_user_timeout(
// if it is available.
if (g_socket_supports_tcp_user_timeout.load() == 0) {
if (0 != getsockopt(fd, IPPROTO_TCP, TCP_USER_TIMEOUT, &newval, &len)) {
gpr_log(GPR_INFO,
"TCP_USER_TIMEOUT is not available. TCP_USER_TIMEOUT won't "
"be used thereafter");
GRPC_TRACE_LOG(tcp, INFO)
<< "TCP_USER_TIMEOUT is not available. TCP_USER_TIMEOUT won't be "
"used thereafter";
g_socket_supports_tcp_user_timeout.store(-1);
} else {
gpr_log(GPR_INFO,
"TCP_USER_TIMEOUT is available. TCP_USER_TIMEOUT will be "
"used thereafter");
GRPC_TRACE_LOG(tcp, INFO)
<< "TCP_USER_TIMEOUT is available. TCP_USER_TIMEOUT will be used "
"thereafter";
g_socket_supports_tcp_user_timeout.store(1);
}
}
if (g_socket_supports_tcp_user_timeout.load() > 0) {
if (GRPC_TRACE_FLAG_ENABLED(tcp)) {
gpr_log(GPR_INFO, "Enabling TCP_USER_TIMEOUT with a timeout of %d ms",
timeout);
}
GRPC_TRACE_LOG(tcp, INFO)
<< "Enabling TCP_USER_TIMEOUT with a timeout of " << timeout
<< " ms";
if (0 != setsockopt(fd, IPPROTO_TCP, TCP_USER_TIMEOUT, &timeout,
sizeof(timeout))) {
gpr_log(GPR_ERROR, "setsockopt(TCP_USER_TIMEOUT) %s",
Expand All @@ -402,10 +401,9 @@ grpc_error_handle grpc_set_socket_tcp_user_timeout(
return absl::OkStatus();
}
if (newval != timeout) {
gpr_log(GPR_INFO,
"Setting TCP_USER_TIMEOUT to value %d ms. Actual "
"TCP_USER_TIMEOUT value is %d ms",
timeout, newval);
GRPC_TRACE_LOG(tcp, INFO)
<< "Setting TCP_USER_TIMEOUT to value " << timeout
<< " ms. Actual TCP_USER_TIMEOUT value is " << newval << " ms";
return absl::OkStatus();
}
}
Expand Down Expand Up @@ -442,7 +440,8 @@ static void probe_ipv6_once(void) {
int fd = socket(AF_INET6, SOCK_STREAM, 0);
g_ipv6_loopback_available = 0;
if (fd < 0) {
LOG(INFO) << "Disabling AF_INET6 sockets because socket() failed.";
GRPC_TRACE_LOG(tcp, INFO)
<< "Disabling AF_INET6 sockets because socket() failed.";
} else {
grpc_sockaddr_in6 addr;
memset(&addr, 0, sizeof(addr));
Expand All @@ -451,8 +450,8 @@ static void probe_ipv6_once(void) {
if (bind(fd, reinterpret_cast<grpc_sockaddr*>(&addr), sizeof(addr)) == 0) {
g_ipv6_loopback_available = 1;
} else {
gpr_log(GPR_INFO,
"Disabling AF_INET6 sockets because ::1 is not available.");
GRPC_TRACE_LOG(tcp, INFO)
<< "Disabling AF_INET6 sockets because ::1 is not available.";
}
close(fd);
}
Expand Down
1 change: 0 additions & 1 deletion src/core/lib/iomgr/tcp_posix.cc
Original file line number Diff line number Diff line change
Expand Up @@ -806,7 +806,6 @@ static void tcp_ref(grpc_tcp* tcp) { tcp->refcount.Ref(); }
#endif

static void tcp_destroy(grpc_endpoint* ep) {
gpr_log(GPR_INFO, "IOMGR endpoint shutdown");
grpc_tcp* tcp = reinterpret_cast<grpc_tcp*>(ep);
ZerocopyDisableAndWaitForRemaining(tcp);
grpc_fd_shutdown(tcp->em_fd, absl::UnavailableError("endpoint shutdown"));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -397,8 +397,8 @@ void TlsChannelSecurityConnector::cancel_check_peer(
if (it != pending_verifier_requests_.end()) {
pending_verifier_request = it->second->request();
} else {
LOG(INFO) << "TlsChannelSecurityConnector::cancel_check_peer: no "
"corresponding pending request found";
VLOG(2) << "TlsChannelSecurityConnector::cancel_check_peer: no "
"corresponding pending request found";
}
}
if (pending_verifier_request != nullptr) {
Expand Down
2 changes: 1 addition & 1 deletion src/core/server/server.cc
Original file line number Diff line number Diff line change
Expand Up @@ -976,7 +976,7 @@ grpc_error_handle Server::SetupTransport(
}
t->StartConnectivityWatch(MakeOrphanable<TransportConnectivityWatcher>(
t->RefAsSubclass<ServerTransport>(), Ref()));
LOG(INFO) << "Adding connection";
GRPC_TRACE_LOG(server_channel, INFO) << "Adding connection";
connections_.emplace(std::move(t));
++connections_open_;
} else {
Expand Down
14 changes: 8 additions & 6 deletions src/core/util/log.cc
Original file line number Diff line number Diff line change
Expand Up @@ -132,15 +132,17 @@ void gpr_log_verbosity_init(void) {
absl::string_view verbosity = grpc_core::ConfigVars::Get().Verbosity();
DVLOG(2) << "Log verbosity: " << verbosity;
if (absl::EqualsIgnoreCase(verbosity, "INFO")) {
LOG(WARNING) << "Not suitable for production. Prefer WARNING or ERROR. "
"However if you see this message in a debug environmenmt "
"or test environmenmt it is safe to ignore this message.";
LOG_FIRST_N(WARNING, 1)
<< "Log level INFO is not suitable for production. Prefer WARNING or "
"ERROR. However if you see this message in a debug environmenmt or "
"test environmenmt it is safe to ignore this message.";
absl::SetVLogLevel("*grpc*/*", -1);
absl::SetMinLogLevel(absl::LogSeverityAtLeast::kInfo);
} else if (absl::EqualsIgnoreCase(verbosity, "DEBUG")) {
LOG(WARNING) << "Not suitable for production. Prefer WARNING or ERROR. "
"However if you see this message in a debug environmenmt "
"or test environmenmt it is safe to ignore this message.";
LOG_FIRST_N(WARNING, 1)
<< "Log level DEBUG is not suitable for production. Prefer WARNING or "
"ERROR. However if you see this message in a debug environmenmt or "
"test environmenmt it is safe to ignore this message.";
absl::SetVLogLevel("*grpc*/*", 2);
absl::SetMinLogLevel(absl::LogSeverityAtLeast::kInfo);
} else if (absl::EqualsIgnoreCase(verbosity, "ERROR")) {
Expand Down
2 changes: 1 addition & 1 deletion src/objective-c/!ProtoCompiler-gRPCCppPlugin.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ Pod::Spec.new do |s|
# exclamation mark ensures that other "regular" pods will be able to find it as it'll be installed
# before them.
s.name = '!ProtoCompiler-gRPCCppPlugin'
v = '1.65.0'
v = '1.65.1'
s.version = v
s.summary = 'The gRPC ProtoC plugin generates C++ files from .proto services.'
s.description = <<-DESC
Expand Down
Loading

0 comments on commit 1c57040

Please sign in to comment.