aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/cpp/server/server_cc.cc
diff options
context:
space:
mode:
authorGravatar Mark D. Roth <roth@google.com>2018-09-25 11:44:28 -0700
committerGravatar Mark D. Roth <roth@google.com>2018-09-26 14:16:18 -0700
commit4d9ad11653f76787c9af76c62ae18f7c7ea53c3d (patch)
treec64b3ef395539a914d64c8bf38ee48804c358bc6 /src/cpp/server/server_cc.cc
parentbe1ce0c4ccbf17ebeee9b7b057d40ff4e12f3479 (diff)
Simplify call state logic, create non-polling CQ, and some cleanup.
Diffstat (limited to 'src/cpp/server/server_cc.cc')
-rw-r--r--src/cpp/server/server_cc.cc7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/cpp/server/server_cc.cc b/src/cpp/server/server_cc.cc
index bf612d2d24..f1f971bf74 100644
--- a/src/cpp/server/server_cc.cc
+++ b/src/cpp/server/server_cc.cc
@@ -380,7 +380,6 @@ class Server::SyncRequestThreadManager : public ThreadManager {
int cq_timeout_msec_;
std::vector<std::unique_ptr<SyncRequest>> sync_requests_;
std::unique_ptr<internal::RpcServiceMethod> unknown_method_;
- std::unique_ptr<internal::RpcServiceMethod> health_check_;
std::shared_ptr<Server::GlobalCallbacks> global_callbacks_;
};
@@ -566,7 +565,11 @@ void Server::Start(ServerCompletionQueue** cqs, size_t num_cqs) {
DefaultHealthCheckServiceEnabled()) {
auto* default_hc_service = new DefaultHealthCheckService;
health_check_service_.reset(default_hc_service);
- health_check_cq = new ServerCompletionQueue(GRPC_CQ_DEFAULT_POLLING);
+ // We create a non-polling CQ to avoid impacting application
+ // performance. This ensures that we don't introduce thread hops
+ // for application requests that wind up on this CQ, which is polled
+ // in its own thread.
+ health_check_cq = new ServerCompletionQueue(GRPC_CQ_NON_POLLING);
grpc_server_register_completion_queue(server_, health_check_cq->cq(),
nullptr);
default_health_check_service_impl =