Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement Watch method in health check service. #16351

Merged
merged 1 commit into from
Aug 28, 2018

Conversation

markdroth
Copy link
Member

@markdroth markdroth commented Aug 14, 2018

This adds a streaming Watch method to the health check service, which is needed as part of the work to enable client-side health checking. The proto changes are imported from grpc/grpc-proto#33.

Note that this changes the health check service to use the async API for both the unary and streaming methods (code based on the work done by @AspirinSJL for server load reporting), so this eliminates the restriction that we don't add the default health checking service on async-only servers.

The one thing here that I'm not crazy about is the way I had to create the ServerCompletionQueue inside of Server::Start(), rather than doing it inside of ServerBuilder like we do for all of the other ones. Unfortunately, I didn't see a better way to do that without breaking the existing EnableDefaultHealthCheckService() API, but I'd welcome suggestions on how to improve this.


This change is Reviewable

@markdroth markdroth added the release notes: yes Indicates if PR needs to be in release notes label Aug 14, 2018
@grpc-testing
Copy link

****************************************************************

libgrpc.so

     VM SIZE        FILE SIZE
 ++++++++++++++  ++++++++++++++

  [ = ]       0        0  [ = ]


****************************************************************

libgrpc++.so

     VM SIZE                                                                                            FILE SIZE
 ++++++++++++++ GROWING                                                                              ++++++++++++++
   +12% +27.0Ki [None]                                                                                +756Ki   +15%
       +12% +24.9Ki [Unmapped]                                                                            +754Ki   +15%
      [NEW]    +709 [Other]                                                                                 +709  [NEW]
      [NEW]    +175 typeinfo name for std::_Bind<std::_Mem_fn<void (grpc::DefaultHealthCheckService::Hea    +175  [NEW]
      [NEW]    +175 typeinfo name for std::_Bind<std::_Mem_fn<void (grpc::DefaultHealthCheckService::Hea    +175  [NEW]
      [NEW]    +157 typeinfo name for std::_Maybe_get_result_type<std::_Mem_fn<void (grpc::DefaultHealth    +157  [NEW]
      [NEW]    +157 typeinfo name for std::_Maybe_get_result_type<std::_Mem_fn<void (grpc::DefaultHealth    +157  [NEW]
      [NEW]    +156 typeinfo name for std::_Weak_result_type_impl<std::_Mem_fn<void (grpc::DefaultHealth    +156  [NEW]
      [NEW]    +156 typeinfo name for std::_Weak_result_type_impl<std::_Mem_fn<void (grpc::DefaultHealth    +156  [NEW]
      [NEW]    +151 typeinfo name for std::_Weak_result_type<std::_Mem_fn<void (grpc::DefaultHealthCheck    +151  [NEW]
      [NEW]    +151 typeinfo name for std::_Weak_result_type<std::_Mem_fn<void (grpc::DefaultHealthCheck    +151  [NEW]
      [NEW]    +142 typeinfo name for std::_Sp_counted_ptr_inplace<grpc::DefaultHealthCheckService::Heal    +142  [NEW]
      [NEW]    +142 typeinfo name for std::_Sp_counted_ptr_inplace<grpc::DefaultHealthCheckService::Heal    +142  [NEW]
      [NEW]    +128 vtable for grpc::ServerAsyncWriter<grpc::ByteBuffer>                                    +128  [NEW]
      [NEW]     +77 typeinfo name for grpc::DefaultHealthCheckService::HealthCheckServiceImpl::CheckCall     +77  [NEW]
      [NEW]     +77 typeinfo name for grpc::DefaultHealthCheckService::HealthCheckServiceImpl::WatchCall     +77  [NEW]
      [NEW]     +72 typeinfo name for grpc::DefaultHealthCheckService::HealthCheckServiceImpl::CallHandl     +72  [NEW]
      [NEW]     +64 typeinfo name for grpc::ServerInterface::PayloadAsyncRequest<grpc::ByteBuffer>           +64  [NEW]
      [NEW]     +56 typeinfo for grpc::ServerAsyncWriterInterface<grpc::ByteBuffer>                          +56  [NEW]
      [NEW]     +56 vtable for std::_Sp_counted_ptr_inplace<grpc::DefaultHealthCheckService::HealthCheck     +56  [NEW]
      [NEW]     +56 vtable for std::_Sp_counted_ptr_inplace<grpc::DefaultHealthCheckService::HealthCheck     +56  [NEW]
       +15%     +16 [None]                                                                                     0  [ = ]
  +342% +41.4Ki src/cpp/server/health/default_health_check_service.cc                                +41.4Ki  +342%
     +21e2% +11.0Ki [Other]                                                                              +11.0Ki +21e2%
      [NEW] +8.64Ki grpc::DefaultHealthCheckService::HealthCheckServiceImpl::CheckCallHandler::OnCallRec +8.64Ki  [NEW]
      [NEW] +5.84Ki grpc::DefaultHealthCheckService::HealthCheckServiceImpl::WatchCallHandler::SendHealt +5.84Ki  [NEW]
      [NEW] +3.83Ki grpc::DefaultHealthCheckService::HealthCheckServiceImpl::WatchCallHandler::OnCallRec +3.83Ki  [NEW]
      [NEW] +3.13Ki grpc::DefaultHealthCheckService::HealthCheckServiceImpl::WatchCallHandler::Shutdown  +3.13Ki  [NEW]
      [NEW] +2.76Ki grpc::DefaultHealthCheckService::HealthCheckServiceImpl::WatchCallHandler::CreateAnd +2.76Ki  [NEW]
      [NEW] +2.14Ki grpc::ServerAsyncWriter<grpc::ByteBuffer>::WriteAndFinish                            +2.14Ki  [NEW]
      [NEW] +1.90Ki grpc::ServerAsyncWriter<grpc::ByteBuffer>::Finish                                    +1.90Ki  [NEW]
      [NEW] +1.67Ki grpc::DefaultHealthCheckService::HealthCheckServiceImpl::CheckCallHandler::CreateAnd +1.67Ki  [NEW]
      [NEW] +1.05Ki grpc::ServerAsyncWriter<grpc::ByteBuffer>::Write                                     +1.05Ki  [NEW]
      [NEW] +1.01Ki grpc::ServerAsyncWriter<grpc::ByteBuffer>::Write                                     +1.01Ki  [NEW]
      [NEW]    +901 grpc::DefaultHealthCheckService::RegisterCallHandler                                    +901  [NEW]
      [NEW]    +857 grpc::DefaultHealthCheckService::HealthCheckServiceImpl::WatchCallHandler::WatchCall    +857  [NEW]
      [NEW]    +830 grpc::ServerAsyncWriter<grpc::ByteBuffer>::SendInitialMetadata                          +830  [NEW]
      [NEW]    +830 grpc::ServerAsyncResponseWriter<grpc::ByteBuffer>::SendInitialMetadata                  +830  [NEW]
      [NEW]    +826 grpc::DefaultHealthCheckService::HealthCheckServiceImpl::DecodeRequest                  +826  [NEW]
      [NEW]    +772 grpc::DefaultHealthCheckService::HealthCheckServiceImpl::WatchCallHandler::~WatchCal    +772  [NEW]
      [NEW]    +764 grpc::DefaultHealthCheckService::HealthCheckServiceImpl::WatchCallHandler::~WatchCal    +764  [NEW]
      [NEW]    +724 std::_Rb_tree<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocato    +724  [NEW]
      [NEW]    +702 grpc::DefaultHealthCheckService::UnregisterCallHandler                                  +702  [NEW]
      [NEW]    +682 grpc::ServerInterface::PayloadAsyncRequest<grpc::ByteBuffer>::FinalizeResult            +682  [NEW]
  +0.4%    +127 src/cpp/server/server_cc.cc                                                             +127  +0.4%
       +54% +1.03Ki grpc::Server::Start                                                                  +1.03Ki   +54%
      [NEW]    +194 void std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >    +194  [NEW]
      [NEW]     +12 [ELF Headers]                                                                            +12  [NEW]

   +19% +68.5Ki TOTAL                                                                                 +797Ki   +15%



@grpc-testing
Copy link

[trickle] No significant performance differences

@grpc-testing
Copy link

Objective-C binary sizes
*****************STATIC******************
  New size                      Old size
 1,951,564      Total (=)      1,951,564

 No significant differences in binary sizes

***************FRAMEWORKS****************
  New size                      Old size
10,662,112      Total (>)     10,662,102

 No significant differences in binary sizes


@grpc-testing
Copy link

[microbenchmarks] No significant performance differences

Copy link
Member

@AspirinSJL AspirinSJL left a comment

Choose a reason for hiding this comment

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

Reviewed 9 of 9 files at r1.
Reviewable status: all files reviewed, 6 unresolved discussions (waiting on @markdroth and @yang-g)


src/cpp/server/health/default_health_check_service.h, line 134 at r1 (raw file):

      ByteBuffer request_;
      GenericServerAsyncResponseWriter stream_;

Maybe rename this to avoid using "stream" in unary case.


src/cpp/server/health/default_health_check_service.h, line 251 at r1 (raw file):

HealthCheckServiceImpl::CallHandler

It looks like services_map_ only makes sense in the streaming case, but we are generalizing the interface to take CallHandler and having SendHealth() in CallHandler. I think it's better to restrict the usage to WatchCallHandler. Then ServiceData only accepts WatchCallHandler, and SendHealth() is only in WatchCallHandler.


src/cpp/server/health/default_health_check_service.cc, line 39 at r1 (raw file):

DefaultHealthCheckService::DefaultHealthCheckService() {
  services_map_[""].SetServingStatus(SERVING);

Why is "" always serving?


src/cpp/server/health/default_health_check_service.cc, line 296 at r1 (raw file):

    ServingStatus serving_status = database_->GetServingStatus(service_name);
    if (serving_status == NOT_FOUND) {
      status = Status(StatusCode::NOT_FOUND, "service name unknown");

We should encode the serving status into the response in this case.


src/cpp/server/health/default_health_check_service.cc, line 419 at r1 (raw file):

"OnCallReceived"

SendHealthLocked


src/cpp/server/health/default_health_check_service.cc, line 443 at r1 (raw file):

"OnReadDone"

OnSendHealthDone

Copy link
Member Author

@markdroth markdroth left a comment

Choose a reason for hiding this comment

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

Reviewable status: all files reviewed, 6 unresolved discussions (waiting on @AspirinSJL and @yang-g)


src/cpp/server/health/default_health_check_service.h, line 134 at r1 (raw file):

Previously, AspirinSJL (Juanli Shen) wrote…

Maybe rename this to avoid using "stream" in unary case.

Done.


src/cpp/server/health/default_health_check_service.h, line 251 at r1 (raw file):

Previously, AspirinSJL (Juanli Shen) wrote…
HealthCheckServiceImpl::CallHandler

It looks like services_map_ only makes sense in the streaming case, but we are generalizing the interface to take CallHandler and having SendHealth() in CallHandler. I think it's better to restrict the usage to WatchCallHandler. Then ServiceData only accepts WatchCallHandler, and SendHealth() is only in WatchCallHandler.

I thought about that, but it would require making WatchCallHandler public in HealthCheckServiceImpl so that DefaultHealthCheckService can access it. I think it's better to have to put this one unused method in the CallHandler API than to expose internal implementation details that don't otherwise need to be exposed.


src/cpp/server/health/default_health_check_service.cc, line 39 at r1 (raw file):

Previously, AspirinSJL (Juanli Shen) wrote…

Why is "" always serving?

This was the existing behavior. I'm not changing it in this PR.


src/cpp/server/health/default_health_check_service.cc, line 296 at r1 (raw file):

Previously, AspirinSJL (Juanli Shen) wrote…

We should encode the serving status into the response in this case.

The existing behavior of the Check method is that it fails with status NOT_FOUND if the service is unknown. This PR adds a Watch method with slightly different semantics, but we did not want to break clients of the existing Check method, so we're not altering its behavior.

Note that for unary RPCs, there's generally no point in populating the response message if the RPC returns a non-OK status, because most clients will ignore the message in that case.


src/cpp/server/health/default_health_check_service.cc, line 419 at r1 (raw file):

Previously, AspirinSJL (Juanli Shen) wrote…
"OnCallReceived"

SendHealthLocked

Done.


src/cpp/server/health/default_health_check_service.cc, line 443 at r1 (raw file):

Previously, AspirinSJL (Juanli Shen) wrote…
"OnReadDone"

OnSendHealthDone

Done.

@grpc-testing
Copy link

****************************************************************

libgrpc.so

     VM SIZE        FILE SIZE
 ++++++++++++++  ++++++++++++++

  [ = ]       0        0  [ = ]


****************************************************************

libgrpc++.so

     VM SIZE                                                                                            FILE SIZE
 ++++++++++++++ GROWING                                                                              ++++++++++++++
   +12% +27.0Ki [None]                                                                                +760Ki   +15%
       +12% +24.9Ki [Unmapped]                                                                            +758Ki   +15%
      [NEW]    +709 [Other]                                                                                 +709  [NEW]
      [NEW]    +175 typeinfo name for std::_Bind<std::_Mem_fn<void (grpc::DefaultHealthCheckService::Hea    +175  [NEW]
      [NEW]    +175 typeinfo name for std::_Bind<std::_Mem_fn<void (grpc::DefaultHealthCheckService::Hea    +175  [NEW]
      [NEW]    +157 typeinfo name for std::_Maybe_get_result_type<std::_Mem_fn<void (grpc::DefaultHealth    +157  [NEW]
      [NEW]    +157 typeinfo name for std::_Maybe_get_result_type<std::_Mem_fn<void (grpc::DefaultHealth    +157  [NEW]
      [NEW]    +156 typeinfo name for std::_Weak_result_type_impl<std::_Mem_fn<void (grpc::DefaultHealth    +156  [NEW]
      [NEW]    +156 typeinfo name for std::_Weak_result_type_impl<std::_Mem_fn<void (grpc::DefaultHealth    +156  [NEW]
      [NEW]    +151 typeinfo name for std::_Weak_result_type<std::_Mem_fn<void (grpc::DefaultHealthCheck    +151  [NEW]
      [NEW]    +151 typeinfo name for std::_Weak_result_type<std::_Mem_fn<void (grpc::DefaultHealthCheck    +151  [NEW]
      [NEW]    +142 typeinfo name for std::_Sp_counted_ptr_inplace<grpc::DefaultHealthCheckService::Heal    +142  [NEW]
      [NEW]    +142 typeinfo name for std::_Sp_counted_ptr_inplace<grpc::DefaultHealthCheckService::Heal    +142  [NEW]
      [NEW]    +128 vtable for grpc::ServerAsyncWriter<grpc::ByteBuffer>                                    +128  [NEW]
      [NEW]     +77 typeinfo name for grpc::DefaultHealthCheckService::HealthCheckServiceImpl::CheckCall     +77  [NEW]
      [NEW]     +77 typeinfo name for grpc::DefaultHealthCheckService::HealthCheckServiceImpl::WatchCall     +77  [NEW]
      [NEW]     +72 typeinfo name for grpc::DefaultHealthCheckService::HealthCheckServiceImpl::CallHandl     +72  [NEW]
      [NEW]     +64 typeinfo name for grpc::ServerInterface::PayloadAsyncRequest<grpc::ByteBuffer>           +64  [NEW]
      [NEW]     +56 typeinfo for grpc::ServerAsyncWriterInterface<grpc::ByteBuffer>                          +56  [NEW]
      [NEW]     +56 vtable for std::_Sp_counted_ptr_inplace<grpc::DefaultHealthCheckService::HealthCheck     +56  [NEW]
      [NEW]     +56 vtable for std::_Sp_counted_ptr_inplace<grpc::DefaultHealthCheckService::HealthCheck     +56  [NEW]
       +14%     +16 [None]                                                                                     0  [ = ]
  +342% +41.4Ki src/cpp/server/health/default_health_check_service.cc                                +41.4Ki  +342%
     +21e2% +11.0Ki [Other]                                                                              +11.0Ki +21e2%
      [NEW] +8.64Ki grpc::DefaultHealthCheckService::HealthCheckServiceImpl::CheckCallHandler::OnCallRec +8.64Ki  [NEW]
      [NEW] +5.84Ki grpc::DefaultHealthCheckService::HealthCheckServiceImpl::WatchCallHandler::SendHealt +5.84Ki  [NEW]
      [NEW] +3.83Ki grpc::DefaultHealthCheckService::HealthCheckServiceImpl::WatchCallHandler::OnCallRec +3.83Ki  [NEW]
      [NEW] +3.13Ki grpc::DefaultHealthCheckService::HealthCheckServiceImpl::WatchCallHandler::Shutdown  +3.13Ki  [NEW]
      [NEW] +2.76Ki grpc::DefaultHealthCheckService::HealthCheckServiceImpl::WatchCallHandler::CreateAnd +2.76Ki  [NEW]
      [NEW] +2.14Ki grpc::ServerAsyncWriter<grpc::ByteBuffer>::WriteAndFinish                            +2.14Ki  [NEW]
      [NEW] +1.90Ki grpc::ServerAsyncWriter<grpc::ByteBuffer>::Finish                                    +1.90Ki  [NEW]
      [NEW] +1.67Ki grpc::DefaultHealthCheckService::HealthCheckServiceImpl::CheckCallHandler::CreateAnd +1.67Ki  [NEW]
      [NEW] +1.05Ki grpc::ServerAsyncWriter<grpc::ByteBuffer>::Write                                     +1.05Ki  [NEW]
      [NEW] +1.01Ki grpc::ServerAsyncWriter<grpc::ByteBuffer>::Write                                     +1.01Ki  [NEW]
      [NEW]    +901 grpc::DefaultHealthCheckService::RegisterCallHandler                                    +901  [NEW]
      [NEW]    +857 grpc::DefaultHealthCheckService::HealthCheckServiceImpl::WatchCallHandler::WatchCall    +857  [NEW]
      [NEW]    +830 grpc::ServerAsyncWriter<grpc::ByteBuffer>::SendInitialMetadata                          +830  [NEW]
      [NEW]    +830 grpc::ServerAsyncResponseWriter<grpc::ByteBuffer>::SendInitialMetadata                  +830  [NEW]
      [NEW]    +826 grpc::DefaultHealthCheckService::HealthCheckServiceImpl::DecodeRequest                  +826  [NEW]
      [NEW]    +772 grpc::DefaultHealthCheckService::HealthCheckServiceImpl::WatchCallHandler::~WatchCal    +772  [NEW]
      [NEW]    +764 grpc::DefaultHealthCheckService::HealthCheckServiceImpl::WatchCallHandler::~WatchCal    +764  [NEW]
      [NEW]    +724 std::_Rb_tree<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocato    +724  [NEW]
      [NEW]    +702 grpc::DefaultHealthCheckService::UnregisterCallHandler                                  +702  [NEW]
      [NEW]    +682 grpc::ServerInterface::PayloadAsyncRequest<grpc::ByteBuffer>::FinalizeResult            +682  [NEW]
  +0.3%    +127 src/cpp/server/server_cc.cc                                                             +127  +0.3%
       +53% +1.04Ki grpc::Server::Start                                                                  +1.04Ki   +53%
      [NEW]     +12 [ELF Headers]                                                                            +12  [NEW]

   +19% +68.6Ki TOTAL                                                                                 +801Ki   +15%



@grpc-testing
Copy link

[trickle] No significant performance differences

@grpc-testing
Copy link

Objective-C binary sizes
*****************STATIC******************
  New size                      Old size
 1,952,730      Total (=)      1,952,730

 No significant differences in binary sizes

***************FRAMEWORKS****************
  New size                      Old size
10,663,751      Total (>)     10,663,750

 No significant differences in binary sizes


@grpc-testing
Copy link

[microbenchmarks] No significant performance differences

Copy link
Member

@AspirinSJL AspirinSJL left a comment

Choose a reason for hiding this comment

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

Looks good to me!

Reviewed 1 of 1 files at r2, 2 of 2 files at r3.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on @yang-g)

@yang-g
Copy link
Member

yang-g commented Aug 17, 2018 via email

@grpc-testing
Copy link

****************************************************************

libgrpc.so

     VM SIZE        FILE SIZE
 ++++++++++++++  ++++++++++++++

  [ = ]       0        0  [ = ]


****************************************************************

libgrpc++.so

     VM SIZE                                                                                            FILE SIZE
 ++++++++++++++ GROWING                                                                              ++++++++++++++
   +12% +27.0Ki [None]                                                                                +760Ki   +15%
       +12% +24.9Ki [Unmapped]                                                                            +758Ki   +15%
      [NEW]    +709 [Other]                                                                                 +709  [NEW]
      [NEW]    +175 typeinfo name for std::_Bind<std::_Mem_fn<void (grpc::DefaultHealthCheckService::Hea    +175  [NEW]
      [NEW]    +175 typeinfo name for std::_Bind<std::_Mem_fn<void (grpc::DefaultHealthCheckService::Hea    +175  [NEW]
      [NEW]    +157 typeinfo name for std::_Maybe_get_result_type<std::_Mem_fn<void (grpc::DefaultHealth    +157  [NEW]
      [NEW]    +157 typeinfo name for std::_Maybe_get_result_type<std::_Mem_fn<void (grpc::DefaultHealth    +157  [NEW]
      [NEW]    +156 typeinfo name for std::_Weak_result_type_impl<std::_Mem_fn<void (grpc::DefaultHealth    +156  [NEW]
      [NEW]    +156 typeinfo name for std::_Weak_result_type_impl<std::_Mem_fn<void (grpc::DefaultHealth    +156  [NEW]
      [NEW]    +151 typeinfo name for std::_Weak_result_type<std::_Mem_fn<void (grpc::DefaultHealthCheck    +151  [NEW]
      [NEW]    +151 typeinfo name for std::_Weak_result_type<std::_Mem_fn<void (grpc::DefaultHealthCheck    +151  [NEW]
      [NEW]    +142 typeinfo name for std::_Sp_counted_ptr_inplace<grpc::DefaultHealthCheckService::Heal    +142  [NEW]
      [NEW]    +142 typeinfo name for std::_Sp_counted_ptr_inplace<grpc::DefaultHealthCheckService::Heal    +142  [NEW]
      [NEW]    +128 vtable for grpc::ServerAsyncWriter<grpc::ByteBuffer>                                    +128  [NEW]
      [NEW]     +77 typeinfo name for grpc::DefaultHealthCheckService::HealthCheckServiceImpl::CheckCall     +77  [NEW]
      [NEW]     +77 typeinfo name for grpc::DefaultHealthCheckService::HealthCheckServiceImpl::WatchCall     +77  [NEW]
      [NEW]     +72 typeinfo name for grpc::DefaultHealthCheckService::HealthCheckServiceImpl::CallHandl     +72  [NEW]
      [NEW]     +64 typeinfo name for grpc::ServerInterface::PayloadAsyncRequest<grpc::ByteBuffer>           +64  [NEW]
      [NEW]     +56 typeinfo for grpc::ServerAsyncWriterInterface<grpc::ByteBuffer>                          +56  [NEW]
      [NEW]     +56 vtable for std::_Sp_counted_ptr_inplace<grpc::DefaultHealthCheckService::HealthCheck     +56  [NEW]
      [NEW]     +56 vtable for std::_Sp_counted_ptr_inplace<grpc::DefaultHealthCheckService::HealthCheck     +56  [NEW]
       +14%     +16 [None]                                                                                     0  [ = ]
  +342% +41.4Ki src/cpp/server/health/default_health_check_service.cc                                +41.4Ki  +342%
     +21e2% +11.0Ki [Other]                                                                              +11.0Ki +21e2%
      [NEW] +8.64Ki grpc::DefaultHealthCheckService::HealthCheckServiceImpl::CheckCallHandler::OnCallRec +8.64Ki  [NEW]
      [NEW] +5.84Ki grpc::DefaultHealthCheckService::HealthCheckServiceImpl::WatchCallHandler::SendHealt +5.84Ki  [NEW]
      [NEW] +3.83Ki grpc::DefaultHealthCheckService::HealthCheckServiceImpl::WatchCallHandler::OnCallRec +3.83Ki  [NEW]
      [NEW] +3.13Ki grpc::DefaultHealthCheckService::HealthCheckServiceImpl::WatchCallHandler::Shutdown  +3.13Ki  [NEW]
      [NEW] +2.76Ki grpc::DefaultHealthCheckService::HealthCheckServiceImpl::WatchCallHandler::CreateAnd +2.76Ki  [NEW]
      [NEW] +2.14Ki grpc::ServerAsyncWriter<grpc::ByteBuffer>::WriteAndFinish                            +2.14Ki  [NEW]
      [NEW] +1.90Ki grpc::ServerAsyncWriter<grpc::ByteBuffer>::Finish                                    +1.90Ki  [NEW]
      [NEW] +1.67Ki grpc::DefaultHealthCheckService::HealthCheckServiceImpl::CheckCallHandler::CreateAnd +1.67Ki  [NEW]
      [NEW] +1.05Ki grpc::ServerAsyncWriter<grpc::ByteBuffer>::Write                                     +1.05Ki  [NEW]
      [NEW] +1.01Ki grpc::ServerAsyncWriter<grpc::ByteBuffer>::Write                                     +1.01Ki  [NEW]
      [NEW]    +901 grpc::DefaultHealthCheckService::RegisterCallHandler                                    +901  [NEW]
      [NEW]    +857 grpc::DefaultHealthCheckService::HealthCheckServiceImpl::WatchCallHandler::WatchCall    +857  [NEW]
      [NEW]    +830 grpc::ServerAsyncWriter<grpc::ByteBuffer>::SendInitialMetadata                          +830  [NEW]
      [NEW]    +830 grpc::ServerAsyncResponseWriter<grpc::ByteBuffer>::SendInitialMetadata                  +830  [NEW]
      [NEW]    +826 grpc::DefaultHealthCheckService::HealthCheckServiceImpl::DecodeRequest                  +826  [NEW]
      [NEW]    +772 grpc::DefaultHealthCheckService::HealthCheckServiceImpl::WatchCallHandler::~WatchCal    +772  [NEW]
      [NEW]    +764 grpc::DefaultHealthCheckService::HealthCheckServiceImpl::WatchCallHandler::~WatchCal    +764  [NEW]
      [NEW]    +724 std::_Rb_tree<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocato    +724  [NEW]
      [NEW]    +702 grpc::DefaultHealthCheckService::UnregisterCallHandler                                  +702  [NEW]
      [NEW]    +682 grpc::ServerInterface::PayloadAsyncRequest<grpc::ByteBuffer>::FinalizeResult            +682  [NEW]
  +0.3%    +127 src/cpp/server/server_cc.cc                                                             +127  +0.3%
       +53% +1.04Ki grpc::Server::Start                                                                  +1.04Ki   +53%
      [NEW]     +12 [ELF Headers]                                                                            +12  [NEW]

   +19% +68.6Ki TOTAL                                                                                 +802Ki   +15%



@grpc-testing
Copy link

[trickle] No significant performance differences

@grpc-testing
Copy link

Objective-C binary sizes
*****************STATIC******************
  New size                      Old size
 1,952,962      Total (=)      1,952,962

 No significant differences in binary sizes

***************FRAMEWORKS****************
  New size                      Old size
10,664,802      Total (>)     10,664,796

 No significant differences in binary sizes


@grpc-testing
Copy link

[microbenchmarks] No significant performance differences

@grpc-testing
Copy link

****************************************************************

libgrpc.so

     VM SIZE        FILE SIZE
 ++++++++++++++  ++++++++++++++

  [ = ]       0        0  [ = ]


****************************************************************

libgrpc++.so

     VM SIZE                                                                                            FILE SIZE
 ++++++++++++++ GROWING                                                                              ++++++++++++++
   +12% +27.0Ki [None]                                                                                +760Ki   +15%
       +12% +24.9Ki [Unmapped]                                                                            +758Ki   +15%
      [NEW]    +709 [Other]                                                                                 +709  [NEW]
      [NEW]    +175 typeinfo name for std::_Bind<std::_Mem_fn<void (grpc::DefaultHealthCheckService::Hea    +175  [NEW]
      [NEW]    +175 typeinfo name for std::_Bind<std::_Mem_fn<void (grpc::DefaultHealthCheckService::Hea    +175  [NEW]
      [NEW]    +157 typeinfo name for std::_Maybe_get_result_type<std::_Mem_fn<void (grpc::DefaultHealth    +157  [NEW]
      [NEW]    +157 typeinfo name for std::_Maybe_get_result_type<std::_Mem_fn<void (grpc::DefaultHealth    +157  [NEW]
      [NEW]    +156 typeinfo name for std::_Weak_result_type_impl<std::_Mem_fn<void (grpc::DefaultHealth    +156  [NEW]
      [NEW]    +156 typeinfo name for std::_Weak_result_type_impl<std::_Mem_fn<void (grpc::DefaultHealth    +156  [NEW]
      [NEW]    +151 typeinfo name for std::_Weak_result_type<std::_Mem_fn<void (grpc::DefaultHealthCheck    +151  [NEW]
      [NEW]    +151 typeinfo name for std::_Weak_result_type<std::_Mem_fn<void (grpc::DefaultHealthCheck    +151  [NEW]
      [NEW]    +142 typeinfo name for std::_Sp_counted_ptr_inplace<grpc::DefaultHealthCheckService::Heal    +142  [NEW]
      [NEW]    +142 typeinfo name for std::_Sp_counted_ptr_inplace<grpc::DefaultHealthCheckService::Heal    +142  [NEW]
      [NEW]    +128 vtable for grpc::ServerAsyncWriter<grpc::ByteBuffer>                                    +128  [NEW]
      [NEW]     +77 typeinfo name for grpc::DefaultHealthCheckService::HealthCheckServiceImpl::CheckCall     +77  [NEW]
      [NEW]     +77 typeinfo name for grpc::DefaultHealthCheckService::HealthCheckServiceImpl::WatchCall     +77  [NEW]
      [NEW]     +72 typeinfo name for grpc::DefaultHealthCheckService::HealthCheckServiceImpl::CallHandl     +72  [NEW]
      [NEW]     +64 typeinfo name for grpc::ServerInterface::PayloadAsyncRequest<grpc::ByteBuffer>           +64  [NEW]
      [NEW]     +56 typeinfo for grpc::ServerAsyncWriterInterface<grpc::ByteBuffer>                          +56  [NEW]
      [NEW]     +56 vtable for std::_Sp_counted_ptr_inplace<grpc::DefaultHealthCheckService::HealthCheck     +56  [NEW]
      [NEW]     +56 vtable for std::_Sp_counted_ptr_inplace<grpc::DefaultHealthCheckService::HealthCheck     +56  [NEW]
       +14%     +16 [None]                                                                                     0  [ = ]
  +342% +41.4Ki src/cpp/server/health/default_health_check_service.cc                                +41.4Ki  +342%
     +21e2% +11.0Ki [Other]                                                                              +11.0Ki +21e2%
      [NEW] +8.64Ki grpc::DefaultHealthCheckService::HealthCheckServiceImpl::CheckCallHandler::OnCallRec +8.64Ki  [NEW]
      [NEW] +5.84Ki grpc::DefaultHealthCheckService::HealthCheckServiceImpl::WatchCallHandler::SendHealt +5.84Ki  [NEW]
      [NEW] +3.83Ki grpc::DefaultHealthCheckService::HealthCheckServiceImpl::WatchCallHandler::OnCallRec +3.83Ki  [NEW]
      [NEW] +3.13Ki grpc::DefaultHealthCheckService::HealthCheckServiceImpl::WatchCallHandler::Shutdown  +3.13Ki  [NEW]
      [NEW] +2.76Ki grpc::DefaultHealthCheckService::HealthCheckServiceImpl::WatchCallHandler::CreateAnd +2.76Ki  [NEW]
      [NEW] +2.14Ki grpc::ServerAsyncWriter<grpc::ByteBuffer>::WriteAndFinish                            +2.14Ki  [NEW]
      [NEW] +1.90Ki grpc::ServerAsyncWriter<grpc::ByteBuffer>::Finish                                    +1.90Ki  [NEW]
      [NEW] +1.67Ki grpc::DefaultHealthCheckService::HealthCheckServiceImpl::CheckCallHandler::CreateAnd +1.67Ki  [NEW]
      [NEW] +1.05Ki grpc::ServerAsyncWriter<grpc::ByteBuffer>::Write                                     +1.05Ki  [NEW]
      [NEW] +1.01Ki grpc::ServerAsyncWriter<grpc::ByteBuffer>::Write                                     +1.01Ki  [NEW]
      [NEW]    +901 grpc::DefaultHealthCheckService::RegisterCallHandler                                    +901  [NEW]
      [NEW]    +857 grpc::DefaultHealthCheckService::HealthCheckServiceImpl::WatchCallHandler::WatchCall    +857  [NEW]
      [NEW]    +830 grpc::ServerAsyncWriter<grpc::ByteBuffer>::SendInitialMetadata                          +830  [NEW]
      [NEW]    +830 grpc::ServerAsyncResponseWriter<grpc::ByteBuffer>::SendInitialMetadata                  +830  [NEW]
      [NEW]    +826 grpc::DefaultHealthCheckService::HealthCheckServiceImpl::DecodeRequest                  +826  [NEW]
      [NEW]    +772 grpc::DefaultHealthCheckService::HealthCheckServiceImpl::WatchCallHandler::~WatchCal    +772  [NEW]
      [NEW]    +764 grpc::DefaultHealthCheckService::HealthCheckServiceImpl::WatchCallHandler::~WatchCal    +764  [NEW]
      [NEW]    +724 std::_Rb_tree<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocato    +724  [NEW]
      [NEW]    +702 grpc::DefaultHealthCheckService::UnregisterCallHandler                                  +702  [NEW]
      [NEW]    +682 grpc::ServerInterface::PayloadAsyncRequest<grpc::ByteBuffer>::FinalizeResult            +682  [NEW]
  +0.3%    +127 src/cpp/server/server_cc.cc                                                             +127  +0.3%
       +53% +1.04Ki grpc::Server::Start                                                                  +1.04Ki   +53%
      [NEW]     +12 [ELF Headers]                                                                            +12  [NEW]

   +19% +68.6Ki TOTAL                                                                                 +802Ki   +15%



@grpc-testing
Copy link

[trickle] No significant performance differences

@grpc-testing
Copy link

[microbenchmarks] No significant performance differences

@grpc-testing
Copy link

****************************************************************

libgrpc.so

     VM SIZE        FILE SIZE
 ++++++++++++++  ++++++++++++++

  [ = ]       0        0  [ = ]


****************************************************************

libgrpc++.so

     VM SIZE                                                                                            FILE SIZE
 ++++++++++++++ GROWING                                                                              ++++++++++++++
   +12% +27.0Ki [None]                                                                                +760Ki   +15%
       +12% +24.9Ki [Unmapped]                                                                            +758Ki   +15%
      [NEW]    +709 [Other]                                                                                 +709  [NEW]
      [NEW]    +175 typeinfo name for std::_Bind<std::_Mem_fn<void (grpc::DefaultHealthCheckService::Hea    +175  [NEW]
      [NEW]    +175 typeinfo name for std::_Bind<std::_Mem_fn<void (grpc::DefaultHealthCheckService::Hea    +175  [NEW]
      [NEW]    +157 typeinfo name for std::_Maybe_get_result_type<std::_Mem_fn<void (grpc::DefaultHealth    +157  [NEW]
      [NEW]    +157 typeinfo name for std::_Maybe_get_result_type<std::_Mem_fn<void (grpc::DefaultHealth    +157  [NEW]
      [NEW]    +156 typeinfo name for std::_Weak_result_type_impl<std::_Mem_fn<void (grpc::DefaultHealth    +156  [NEW]
      [NEW]    +156 typeinfo name for std::_Weak_result_type_impl<std::_Mem_fn<void (grpc::DefaultHealth    +156  [NEW]
      [NEW]    +151 typeinfo name for std::_Weak_result_type<std::_Mem_fn<void (grpc::DefaultHealthCheck    +151  [NEW]
      [NEW]    +151 typeinfo name for std::_Weak_result_type<std::_Mem_fn<void (grpc::DefaultHealthCheck    +151  [NEW]
      [NEW]    +142 typeinfo name for std::_Sp_counted_ptr_inplace<grpc::DefaultHealthCheckService::Heal    +142  [NEW]
      [NEW]    +142 typeinfo name for std::_Sp_counted_ptr_inplace<grpc::DefaultHealthCheckService::Heal    +142  [NEW]
      [NEW]    +128 vtable for grpc::ServerAsyncWriter<grpc::ByteBuffer>                                    +128  [NEW]
      [NEW]     +77 typeinfo name for grpc::DefaultHealthCheckService::HealthCheckServiceImpl::CheckCall     +77  [NEW]
      [NEW]     +77 typeinfo name for grpc::DefaultHealthCheckService::HealthCheckServiceImpl::WatchCall     +77  [NEW]
      [NEW]     +72 typeinfo name for grpc::DefaultHealthCheckService::HealthCheckServiceImpl::CallHandl     +72  [NEW]
      [NEW]     +64 typeinfo name for grpc::ServerInterface::PayloadAsyncRequest<grpc::ByteBuffer>           +64  [NEW]
      [NEW]     +56 typeinfo for grpc::ServerAsyncWriterInterface<grpc::ByteBuffer>                          +56  [NEW]
      [NEW]     +56 vtable for std::_Sp_counted_ptr_inplace<grpc::DefaultHealthCheckService::HealthCheck     +56  [NEW]
      [NEW]     +56 vtable for std::_Sp_counted_ptr_inplace<grpc::DefaultHealthCheckService::HealthCheck     +56  [NEW]
       +14%     +16 [None]                                                                                     0  [ = ]
  +342% +41.4Ki src/cpp/server/health/default_health_check_service.cc                                +41.4Ki  +342%
     +21e2% +11.0Ki [Other]                                                                              +11.0Ki +21e2%
      [NEW] +8.64Ki grpc::DefaultHealthCheckService::HealthCheckServiceImpl::CheckCallHandler::OnCallRec +8.64Ki  [NEW]
      [NEW] +5.84Ki grpc::DefaultHealthCheckService::HealthCheckServiceImpl::WatchCallHandler::SendHealt +5.84Ki  [NEW]
      [NEW] +3.83Ki grpc::DefaultHealthCheckService::HealthCheckServiceImpl::WatchCallHandler::OnCallRec +3.83Ki  [NEW]
      [NEW] +3.13Ki grpc::DefaultHealthCheckService::HealthCheckServiceImpl::WatchCallHandler::Shutdown  +3.13Ki  [NEW]
      [NEW] +2.76Ki grpc::DefaultHealthCheckService::HealthCheckServiceImpl::WatchCallHandler::CreateAnd +2.76Ki  [NEW]
      [NEW] +2.14Ki grpc::ServerAsyncWriter<grpc::ByteBuffer>::WriteAndFinish                            +2.14Ki  [NEW]
      [NEW] +1.90Ki grpc::ServerAsyncWriter<grpc::ByteBuffer>::Finish                                    +1.90Ki  [NEW]
      [NEW] +1.67Ki grpc::DefaultHealthCheckService::HealthCheckServiceImpl::CheckCallHandler::CreateAnd +1.67Ki  [NEW]
      [NEW] +1.05Ki grpc::ServerAsyncWriter<grpc::ByteBuffer>::Write                                     +1.05Ki  [NEW]
      [NEW] +1.01Ki grpc::ServerAsyncWriter<grpc::ByteBuffer>::Write                                     +1.01Ki  [NEW]
      [NEW]    +901 grpc::DefaultHealthCheckService::RegisterCallHandler                                    +901  [NEW]
      [NEW]    +857 grpc::DefaultHealthCheckService::HealthCheckServiceImpl::WatchCallHandler::WatchCall    +857  [NEW]
      [NEW]    +830 grpc::ServerAsyncWriter<grpc::ByteBuffer>::SendInitialMetadata                          +830  [NEW]
      [NEW]    +830 grpc::ServerAsyncResponseWriter<grpc::ByteBuffer>::SendInitialMetadata                  +830  [NEW]
      [NEW]    +826 grpc::DefaultHealthCheckService::HealthCheckServiceImpl::DecodeRequest                  +826  [NEW]
      [NEW]    +772 grpc::DefaultHealthCheckService::HealthCheckServiceImpl::WatchCallHandler::~WatchCal    +772  [NEW]
      [NEW]    +764 grpc::DefaultHealthCheckService::HealthCheckServiceImpl::WatchCallHandler::~WatchCal    +764  [NEW]
      [NEW]    +724 std::_Rb_tree<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocato    +724  [NEW]
      [NEW]    +702 grpc::DefaultHealthCheckService::UnregisterCallHandler                                  +702  [NEW]
      [NEW]    +682 grpc::ServerInterface::PayloadAsyncRequest<grpc::ByteBuffer>::FinalizeResult            +682  [NEW]
  +0.3%    +127 src/cpp/server/server_cc.cc                                                             +127  +0.3%
       +53% +1.04Ki grpc::Server::Start                                                                  +1.04Ki   +53%
      [NEW]     +12 [ELF Headers]                                                                            +12  [NEW]

   +19% +68.6Ki TOTAL                                                                                 +802Ki   +15%



@grpc-testing
Copy link

[trickle] No significant performance differences

@grpc-testing
Copy link

Objective-C binary sizes
*****************STATIC******************
  New size                      Old size
 1,952,584      Total (=)      1,952,584

 No significant differences in binary sizes

***************FRAMEWORKS****************
  New size                      Old size
10,665,707      Total (>)     10,665,703

 No significant differences in binary sizes


@grpc-testing
Copy link

[microbenchmarks] No significant performance differences

Copy link
Member

@yang-g yang-g left a comment

Choose a reason for hiding this comment

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

Before I dig into the implementation details, is there a design doc for the addition of the Watch API you can point me to? I am a bit not sure what it is used for and whether we should introduce more structured request and response type for the API. Let's say when there are several services at the server and a client wants to watch all of them, should the client start one watch stream or one for each service.

AddMethod(watch_method_);
// Create serving thread.
thread_ = std::unique_ptr<::grpc_core::Thread>(
new ::grpc_core::Thread("health_check_service", Serve, this));
Copy link
Member

Choose a reason for hiding this comment

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

"grpc_health_check_service"?

Copy link
Member Author

Choose a reason for hiding this comment

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

Done.

void DefaultHealthCheckService::HealthCheckServiceImpl::Serve(void* arg) {
HealthCheckServiceImpl* service =
reinterpret_cast<HealthCheckServiceImpl*>(arg);
// TODO(juanlishen): This is a workaround to wait for the cq to be ready.
Copy link
Member

Choose a reason for hiding this comment

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

@AspirinSJL what does it mean by cq not ready?

// instance will deallocate itself when it's done.
CreateAndStart(cq_, database_, service_);
// Process request.
gpr_log(GPR_INFO, "[HCS %p] Health check started for handler %p", service_,
Copy link
Member

Choose a reason for hiding this comment

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

downgrade to debug log?

Copy link
Member Author

Choose a reason for hiding this comment

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

Done.

std::placeholders::_1, std::placeholders::_2),
std::move(self));
if (status.ok()) {
writer_.Finish(response, status, &next_);
Copy link
Member

Choose a reason for hiding this comment

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

Note if the cq has been shutdown during the process, we should not call Finish here any more.

Copy link
Member Author

Choose a reason for hiding this comment

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

Done.

void DefaultHealthCheckService::HealthCheckServiceImpl::CheckCallHandler::
OnFinishDone(std::shared_ptr<CallHandler> self, bool ok) {
if (ok) {
gpr_log(GPR_INFO, "[HCS %p] Health check call finished for handler %p",
Copy link
Member

Choose a reason for hiding this comment

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

downgrade to debug log?

Copy link
Member Author

Choose a reason for hiding this comment

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

Done.

CallableTag(std::bind(&WatchCallHandler::OnFinishDone, this,
std::placeholders::_1, std::placeholders::_2),
std::move(self));
// TODO(juanlishen): Maybe add a message proto for the client to
Copy link
Member

Choose a reason for hiding this comment

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

I am not sure the comment is relevant.

Copy link
Member Author

Choose a reason for hiding this comment

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

Good point. This is here because I copied Juanli's code for the load reporting service, but I agree that this comment is not needed in this case. Removed.

// TODO(juanlishen): Maybe add a message proto for the client to
// explicitly cancel the stream so that we can return OK status in such
// cases.
stream_.Finish(Status::CANCELLED, &on_finish_done_);
Copy link
Member

Choose a reason for hiding this comment

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

So this stream is never finished with OK status, right?

Copy link
Member Author

Choose a reason for hiding this comment

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

Right. Basically, the only way it ever gets terminated is if the client cancels it or the server is shutting down.

void DefaultHealthCheckService::HealthCheckServiceImpl::WatchCallHandler::
OnFinishDone(std::shared_ptr<CallHandler> self, bool ok) {
if (ok) {
gpr_log(GPR_INFO,
Copy link
Member

Choose a reason for hiding this comment

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

Depending on how many streams/client we expect to see at a server, these logs could be spammy.

Copy link
Member Author

Choose a reason for hiding this comment

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

Good point. Changed them all to debug.

}
// OnCallReceived() may be called after OnDoneNotified(), so we need to
// try to Finish() every time we are in Shutdown().
if (call_state_ >= CALL_RECEIVED && call_state_ < FINISH_CALLED) {
Copy link
Member

Choose a reason for hiding this comment

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

Is it possible that two Shutdown's are called from two threads? Say a client cancel comes in and we enter Shutdown from DoneNotified and then enter again when a SendDone sees shutdown_ is true and enters Shutdown again. We are going to call Finish twice.

Copy link
Member Author

Choose a reason for hiding this comment

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

I think the fact that we currently only have a single thread polling the cq means that this won't happen. But you're right that it's something we need to be careful of if that changes in the future. I've added a TODO about this.

Copy link
Member

Choose a reason for hiding this comment

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

Yes. I was think about some Executor-based new polling engine when I was asking.

void* tag;
bool ok;
while (true) {
if (!service->cq_->Next(&tag, &ok)) {
Copy link
Member

Choose a reason for hiding this comment

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

I am not a big fan of a single cq on a single thread. But I think it will work.

A bit more context on the sync-only implementation of the previous implementation: When I first did the PR, it contains sync and async versions (use automatically depending on whether the server has sync or async). The async version was done similar to the Unimplemented version, but was later removed because "our sync server will be as cheap as async" :). But of course when we have a stream version of API, it should use async somehow.

Copy link
Member Author

Choose a reason for hiding this comment

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

Yeah. Given that we need the async implementation for the streaming method, it seemed like a good idea to use async for the unary method too.

I agree that a single polling thread might prove a bottleneck in some cases. I was thinking that if/when that happens, we could add some optional parameters to set the number of threads here. But I would welcome alternative suggestions if you have any.

I suspect that the number of threads here is the real issue, not the number of cqs. Is there some reason we might want to spread over multiple cqs too?

Copy link
Member

Choose a reason for hiding this comment

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

Right, most of the problem is the single thread. Adding a cq in the back is not nice but something we can tolerate I guess.

Copy link
Member

Choose a reason for hiding this comment

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

In an original implementation, we did the async service handling by requesting something on easy async cq in a similar way as the Unimplemented. The benefit of that is 1. we do not need to create a cq behind the back and 2 the handling scales out to all cq/threads automatically. But it would be more complicated and not as self-contained as this implementation (especially for a streaming call). So I think this is good.

Copy link
Member Author

@markdroth markdroth left a comment

Choose a reason for hiding this comment

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

I've sent out a gRFC for client-side health checking:

grpc/proposal#97

Please let me know if you have any other questions. Thanks!

AddMethod(watch_method_);
// Create serving thread.
thread_ = std::unique_ptr<::grpc_core::Thread>(
new ::grpc_core::Thread("health_check_service", Serve, this));
Copy link
Member Author

Choose a reason for hiding this comment

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

Done.

void* tag;
bool ok;
while (true) {
if (!service->cq_->Next(&tag, &ok)) {
Copy link
Member Author

Choose a reason for hiding this comment

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

Yeah. Given that we need the async implementation for the streaming method, it seemed like a good idea to use async for the unary method too.

I agree that a single polling thread might prove a bottleneck in some cases. I was thinking that if/when that happens, we could add some optional parameters to set the number of threads here. But I would welcome alternative suggestions if you have any.

I suspect that the number of threads here is the real issue, not the number of cqs. Is there some reason we might want to spread over multiple cqs too?

// instance will deallocate itself when it's done.
CreateAndStart(cq_, database_, service_);
// Process request.
gpr_log(GPR_INFO, "[HCS %p] Health check started for handler %p", service_,
Copy link
Member Author

Choose a reason for hiding this comment

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

Done.

void DefaultHealthCheckService::HealthCheckServiceImpl::CheckCallHandler::
OnFinishDone(std::shared_ptr<CallHandler> self, bool ok) {
if (ok) {
gpr_log(GPR_INFO, "[HCS %p] Health check call finished for handler %p",
Copy link
Member Author

Choose a reason for hiding this comment

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

Done.

CallableTag(std::bind(&WatchCallHandler::OnFinishDone, this,
std::placeholders::_1, std::placeholders::_2),
std::move(self));
// TODO(juanlishen): Maybe add a message proto for the client to
Copy link
Member Author

Choose a reason for hiding this comment

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

Good point. This is here because I copied Juanli's code for the load reporting service, but I agree that this comment is not needed in this case. Removed.

// TODO(juanlishen): Maybe add a message proto for the client to
// explicitly cancel the stream so that we can return OK status in such
// cases.
stream_.Finish(Status::CANCELLED, &on_finish_done_);
Copy link
Member Author

Choose a reason for hiding this comment

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

Right. Basically, the only way it ever gets terminated is if the client cancels it or the server is shutting down.

void DefaultHealthCheckService::HealthCheckServiceImpl::WatchCallHandler::
OnFinishDone(std::shared_ptr<CallHandler> self, bool ok) {
if (ok) {
gpr_log(GPR_INFO,
Copy link
Member Author

Choose a reason for hiding this comment

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

Good point. Changed them all to debug.

std::placeholders::_1, std::placeholders::_2),
std::move(self));
if (status.ok()) {
writer_.Finish(response, status, &next_);
Copy link
Member Author

Choose a reason for hiding this comment

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

Done.

}
// OnCallReceived() may be called after OnDoneNotified(), so we need to
// try to Finish() every time we are in Shutdown().
if (call_state_ >= CALL_RECEIVED && call_state_ < FINISH_CALLED) {
Copy link
Member Author

Choose a reason for hiding this comment

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

I think the fact that we currently only have a single thread polling the cq means that this won't happen. But you're right that it's something we need to be careful of if that changes in the future. I've added a TODO about this.

@grpc-testing
Copy link

****************************************************************

libgrpc.so

     VM SIZE        FILE SIZE
 ++++++++++++++  ++++++++++++++

  [ = ]       0        0  [ = ]


****************************************************************

libgrpc++.so

     VM SIZE                                                                                            FILE SIZE
 ++++++++++++++ GROWING                                                                              ++++++++++++++
   +12% +27.1Ki [None]                                                                                +762Ki   +15%
       +12% +24.9Ki [Unmapped]                                                                            +760Ki   +15%
      [NEW]    +709 [Other]                                                                                 +709  [NEW]
      [NEW]    +175 typeinfo name for std::_Bind<std::_Mem_fn<void (grpc::DefaultHealthCheckService::Hea    +175  [NEW]
      [NEW]    +175 typeinfo name for std::_Bind<std::_Mem_fn<void (grpc::DefaultHealthCheckService::Hea    +175  [NEW]
      [NEW]    +157 typeinfo name for std::_Maybe_get_result_type<std::_Mem_fn<void (grpc::DefaultHealth    +157  [NEW]
      [NEW]    +157 typeinfo name for std::_Maybe_get_result_type<std::_Mem_fn<void (grpc::DefaultHealth    +157  [NEW]
      [NEW]    +156 typeinfo name for std::_Weak_result_type_impl<std::_Mem_fn<void (grpc::DefaultHealth    +156  [NEW]
      [NEW]    +156 typeinfo name for std::_Weak_result_type_impl<std::_Mem_fn<void (grpc::DefaultHealth    +156  [NEW]
      [NEW]    +151 typeinfo name for std::_Weak_result_type<std::_Mem_fn<void (grpc::DefaultHealthCheck    +151  [NEW]
      [NEW]    +151 typeinfo name for std::_Weak_result_type<std::_Mem_fn<void (grpc::DefaultHealthCheck    +151  [NEW]
      [NEW]    +142 typeinfo name for std::_Sp_counted_ptr_inplace<grpc::DefaultHealthCheckService::Heal    +142  [NEW]
      [NEW]    +142 typeinfo name for std::_Sp_counted_ptr_inplace<grpc::DefaultHealthCheckService::Heal    +142  [NEW]
      [NEW]    +128 vtable for grpc::ServerAsyncWriter<grpc::ByteBuffer>                                    +128  [NEW]
      [NEW]     +77 typeinfo name for grpc::DefaultHealthCheckService::HealthCheckServiceImpl::CheckCall     +77  [NEW]
      [NEW]     +77 typeinfo name for grpc::DefaultHealthCheckService::HealthCheckServiceImpl::WatchCall     +77  [NEW]
      [NEW]     +72 typeinfo name for grpc::DefaultHealthCheckService::HealthCheckServiceImpl::CallHandl     +72  [NEW]
      [NEW]     +64 typeinfo name for grpc::ServerInterface::PayloadAsyncRequest<grpc::ByteBuffer>           +64  [NEW]
      [NEW]     +56 typeinfo for grpc::ServerAsyncWriterInterface<grpc::ByteBuffer>                          +56  [NEW]
      [NEW]     +56 vtable for std::_Sp_counted_ptr_inplace<grpc::DefaultHealthCheckService::HealthCheck     +56  [NEW]
      [NEW]     +56 vtable for std::_Sp_counted_ptr_inplace<grpc::DefaultHealthCheckService::HealthCheck     +56  [NEW]
       +14%     +16 [None]                                                                                     0  [ = ]
  +343% +41.5Ki src/cpp/server/health/default_health_check_service.cc                                +41.5Ki  +343%
     +21e2% +11.0Ki [Other]                                                                              +11.0Ki +21e2%
      [NEW] +8.79Ki grpc::DefaultHealthCheckService::HealthCheckServiceImpl::CheckCallHandler::OnCallRec +8.79Ki  [NEW]
      [NEW] +5.84Ki grpc::DefaultHealthCheckService::HealthCheckServiceImpl::WatchCallHandler::SendHealt +5.84Ki  [NEW]
      [NEW] +3.83Ki grpc::DefaultHealthCheckService::HealthCheckServiceImpl::WatchCallHandler::OnCallRec +3.83Ki  [NEW]
      [NEW] +3.12Ki grpc::DefaultHealthCheckService::HealthCheckServiceImpl::WatchCallHandler::Shutdown  +3.12Ki  [NEW]
      [NEW] +2.76Ki grpc::DefaultHealthCheckService::HealthCheckServiceImpl::WatchCallHandler::CreateAnd +2.76Ki  [NEW]
      [NEW] +2.14Ki grpc::ServerAsyncWriter<grpc::ByteBuffer>::WriteAndFinish                            +2.14Ki  [NEW]
      [NEW] +1.90Ki grpc::ServerAsyncWriter<grpc::ByteBuffer>::Finish                                    +1.90Ki  [NEW]
      [NEW] +1.67Ki grpc::DefaultHealthCheckService::HealthCheckServiceImpl::CheckCallHandler::CreateAnd +1.67Ki  [NEW]
      [NEW] +1.05Ki grpc::ServerAsyncWriter<grpc::ByteBuffer>::Write                                     +1.05Ki  [NEW]
      [NEW] +1.01Ki grpc::ServerAsyncWriter<grpc::ByteBuffer>::Write                                     +1.01Ki  [NEW]
      [NEW]    +901 grpc::DefaultHealthCheckService::RegisterCallHandler                                    +901  [NEW]
      [NEW]    +857 grpc::DefaultHealthCheckService::HealthCheckServiceImpl::WatchCallHandler::WatchCall    +857  [NEW]
      [NEW]    +830 grpc::ServerAsyncWriter<grpc::ByteBuffer>::SendInitialMetadata                          +830  [NEW]
      [NEW]    +830 grpc::ServerAsyncResponseWriter<grpc::ByteBuffer>::SendInitialMetadata                  +830  [NEW]
      [NEW]    +826 grpc::DefaultHealthCheckService::HealthCheckServiceImpl::DecodeRequest                  +826  [NEW]
      [NEW]    +772 grpc::DefaultHealthCheckService::HealthCheckServiceImpl::WatchCallHandler::~WatchCal    +772  [NEW]
      [NEW]    +764 grpc::DefaultHealthCheckService::HealthCheckServiceImpl::WatchCallHandler::~WatchCal    +764  [NEW]
      [NEW]    +724 std::_Rb_tree<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocato    +724  [NEW]
      [NEW]    +702 grpc::DefaultHealthCheckService::UnregisterCallHandler                                  +702  [NEW]
      [NEW]    +682 grpc::ServerInterface::PayloadAsyncRequest<grpc::ByteBuffer>::FinalizeResult            +682  [NEW]
  +0.3%    +127 src/cpp/server/server_cc.cc                                                             +127  +0.3%
       +53% +1.04Ki grpc::Server::Start                                                                  +1.04Ki   +53%
      [NEW]     +12 [ELF Headers]                                                                            +12  [NEW]

   +19% +68.7Ki TOTAL                                                                                 +804Ki   +15%



@grpc-testing
Copy link

[trickle] No significant performance differences

@grpc-testing
Copy link

Objective-C binary sizes
*****************STATIC******************
  New size                      Old size
 1,955,069      Total (=)      1,955,069

 No significant differences in binary sizes

***************FRAMEWORKS****************
  New size                      Old size
10,843,023      Total (<)     10,843,027

 No significant differences in binary sizes


@grpc-testing
Copy link

[microbenchmarks] No significant performance differences

Copy link
Member

@yang-g yang-g left a comment

Choose a reason for hiding this comment

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

LGTM

@grpc-testing
Copy link

****************************************************************

libgrpc.so

     VM SIZE        FILE SIZE
 ++++++++++++++  ++++++++++++++

  [ = ]       0        0  [ = ]


****************************************************************

libgrpc++.so

     VM SIZE                                                                                            FILE SIZE
 ++++++++++++++ GROWING                                                                              ++++++++++++++
   +12% +27.1Ki [None]                                                                                +762Ki   +15%
       +12% +24.9Ki [Unmapped]                                                                            +760Ki   +15%
      [NEW]    +709 [Other]                                                                                 +709  [NEW]
      [NEW]    +175 typeinfo name for std::_Bind<std::_Mem_fn<void (grpc::DefaultHealthCheckService::Hea    +175  [NEW]
      [NEW]    +175 typeinfo name for std::_Bind<std::_Mem_fn<void (grpc::DefaultHealthCheckService::Hea    +175  [NEW]
      [NEW]    +157 typeinfo name for std::_Maybe_get_result_type<std::_Mem_fn<void (grpc::DefaultHealth    +157  [NEW]
      [NEW]    +157 typeinfo name for std::_Maybe_get_result_type<std::_Mem_fn<void (grpc::DefaultHealth    +157  [NEW]
      [NEW]    +156 typeinfo name for std::_Weak_result_type_impl<std::_Mem_fn<void (grpc::DefaultHealth    +156  [NEW]
      [NEW]    +156 typeinfo name for std::_Weak_result_type_impl<std::_Mem_fn<void (grpc::DefaultHealth    +156  [NEW]
      [NEW]    +151 typeinfo name for std::_Weak_result_type<std::_Mem_fn<void (grpc::DefaultHealthCheck    +151  [NEW]
      [NEW]    +151 typeinfo name for std::_Weak_result_type<std::_Mem_fn<void (grpc::DefaultHealthCheck    +151  [NEW]
      [NEW]    +142 typeinfo name for std::_Sp_counted_ptr_inplace<grpc::DefaultHealthCheckService::Heal    +142  [NEW]
      [NEW]    +142 typeinfo name for std::_Sp_counted_ptr_inplace<grpc::DefaultHealthCheckService::Heal    +142  [NEW]
      [NEW]    +128 vtable for grpc::ServerAsyncWriter<grpc::ByteBuffer>                                    +128  [NEW]
      [NEW]     +77 typeinfo name for grpc::DefaultHealthCheckService::HealthCheckServiceImpl::CheckCall     +77  [NEW]
      [NEW]     +77 typeinfo name for grpc::DefaultHealthCheckService::HealthCheckServiceImpl::WatchCall     +77  [NEW]
      [NEW]     +72 typeinfo name for grpc::DefaultHealthCheckService::HealthCheckServiceImpl::CallHandl     +72  [NEW]
      [NEW]     +64 typeinfo name for grpc::ServerInterface::PayloadAsyncRequest<grpc::ByteBuffer>           +64  [NEW]
      [NEW]     +56 typeinfo for grpc::ServerAsyncWriterInterface<grpc::ByteBuffer>                          +56  [NEW]
      [NEW]     +56 vtable for std::_Sp_counted_ptr_inplace<grpc::DefaultHealthCheckService::HealthCheck     +56  [NEW]
      [NEW]     +56 vtable for std::_Sp_counted_ptr_inplace<grpc::DefaultHealthCheckService::HealthCheck     +56  [NEW]
       +14%     +16 [None]                                                                                     0  [ = ]
  +343% +41.5Ki src/cpp/server/health/default_health_check_service.cc                                +41.5Ki  +343%
     +21e2% +11.0Ki [Other]                                                                              +11.0Ki +21e2%
      [NEW] +8.79Ki grpc::DefaultHealthCheckService::HealthCheckServiceImpl::CheckCallHandler::OnCallRec +8.79Ki  [NEW]
      [NEW] +5.84Ki grpc::DefaultHealthCheckService::HealthCheckServiceImpl::WatchCallHandler::SendHealt +5.84Ki  [NEW]
      [NEW] +3.83Ki grpc::DefaultHealthCheckService::HealthCheckServiceImpl::WatchCallHandler::OnCallRec +3.83Ki  [NEW]
      [NEW] +3.12Ki grpc::DefaultHealthCheckService::HealthCheckServiceImpl::WatchCallHandler::Shutdown  +3.12Ki  [NEW]
      [NEW] +2.76Ki grpc::DefaultHealthCheckService::HealthCheckServiceImpl::WatchCallHandler::CreateAnd +2.76Ki  [NEW]
      [NEW] +2.14Ki grpc::ServerAsyncWriter<grpc::ByteBuffer>::WriteAndFinish                            +2.14Ki  [NEW]
      [NEW] +1.90Ki grpc::ServerAsyncWriter<grpc::ByteBuffer>::Finish                                    +1.90Ki  [NEW]
      [NEW] +1.67Ki grpc::DefaultHealthCheckService::HealthCheckServiceImpl::CheckCallHandler::CreateAnd +1.67Ki  [NEW]
      [NEW] +1.05Ki grpc::ServerAsyncWriter<grpc::ByteBuffer>::Write                                     +1.05Ki  [NEW]
      [NEW] +1.01Ki grpc::ServerAsyncWriter<grpc::ByteBuffer>::Write                                     +1.01Ki  [NEW]
      [NEW]    +901 grpc::DefaultHealthCheckService::RegisterCallHandler                                    +901  [NEW]
      [NEW]    +857 grpc::DefaultHealthCheckService::HealthCheckServiceImpl::WatchCallHandler::WatchCall    +857  [NEW]
      [NEW]    +830 grpc::ServerAsyncWriter<grpc::ByteBuffer>::SendInitialMetadata                          +830  [NEW]
      [NEW]    +830 grpc::ServerAsyncResponseWriter<grpc::ByteBuffer>::SendInitialMetadata                  +830  [NEW]
      [NEW]    +826 grpc::DefaultHealthCheckService::HealthCheckServiceImpl::DecodeRequest                  +826  [NEW]
      [NEW]    +772 grpc::DefaultHealthCheckService::HealthCheckServiceImpl::WatchCallHandler::~WatchCal    +772  [NEW]
      [NEW]    +764 grpc::DefaultHealthCheckService::HealthCheckServiceImpl::WatchCallHandler::~WatchCal    +764  [NEW]
      [NEW]    +724 std::_Rb_tree<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocato    +724  [NEW]
      [NEW]    +702 grpc::DefaultHealthCheckService::UnregisterCallHandler                                  +702  [NEW]
      [NEW]    +682 grpc::ServerInterface::PayloadAsyncRequest<grpc::ByteBuffer>::FinalizeResult            +682  [NEW]
  +0.3%    +127 src/cpp/server/server_cc.cc                                                             +127  +0.3%
       +53% +1.04Ki grpc::Server::Start                                                                  +1.04Ki   +53%
      [NEW]     +12 [ELF Headers]                                                                            +12  [NEW]

   +19% +68.7Ki TOTAL                                                                                 +804Ki   +15%



@grpc-testing
Copy link

[trickle] No significant performance differences

@grpc-testing
Copy link

Objective-C binary sizes
*****************STATIC******************
  New size                      Old size
 1,954,464      Total (=)      1,954,464

 No significant differences in binary sizes

***************FRAMEWORKS****************
  New size                      Old size
10,842,332      Total (>)     10,842,331

 No significant differences in binary sizes


@grpc-testing
Copy link

[microbenchmarks] No significant performance differences

@grpc-testing
Copy link

****************************************************************

libgrpc.so

     VM SIZE        FILE SIZE
 ++++++++++++++  ++++++++++++++

  [ = ]       0        0  [ = ]


****************************************************************

libgrpc++.so

     VM SIZE                                                                                            FILE SIZE
 ++++++++++++++ GROWING                                                                              ++++++++++++++
   +12% +27.1Ki [None]                                                                                +762Ki   +15%
       +12% +24.9Ki [Unmapped]                                                                            +760Ki   +15%
      [NEW]    +709 [Other]                                                                                 +709  [NEW]
      [NEW]    +175 typeinfo name for std::_Bind<std::_Mem_fn<void (grpc::DefaultHealthCheckService::Hea    +175  [NEW]
      [NEW]    +175 typeinfo name for std::_Bind<std::_Mem_fn<void (grpc::DefaultHealthCheckService::Hea    +175  [NEW]
      [NEW]    +157 typeinfo name for std::_Maybe_get_result_type<std::_Mem_fn<void (grpc::DefaultHealth    +157  [NEW]
      [NEW]    +157 typeinfo name for std::_Maybe_get_result_type<std::_Mem_fn<void (grpc::DefaultHealth    +157  [NEW]
      [NEW]    +156 typeinfo name for std::_Weak_result_type_impl<std::_Mem_fn<void (grpc::DefaultHealth    +156  [NEW]
      [NEW]    +156 typeinfo name for std::_Weak_result_type_impl<std::_Mem_fn<void (grpc::DefaultHealth    +156  [NEW]
      [NEW]    +151 typeinfo name for std::_Weak_result_type<std::_Mem_fn<void (grpc::DefaultHealthCheck    +151  [NEW]
      [NEW]    +151 typeinfo name for std::_Weak_result_type<std::_Mem_fn<void (grpc::DefaultHealthCheck    +151  [NEW]
      [NEW]    +142 typeinfo name for std::_Sp_counted_ptr_inplace<grpc::DefaultHealthCheckService::Heal    +142  [NEW]
      [NEW]    +142 typeinfo name for std::_Sp_counted_ptr_inplace<grpc::DefaultHealthCheckService::Heal    +142  [NEW]
      [NEW]    +128 vtable for grpc::ServerAsyncWriter<grpc::ByteBuffer>                                    +128  [NEW]
      [NEW]     +77 typeinfo name for grpc::DefaultHealthCheckService::HealthCheckServiceImpl::CheckCall     +77  [NEW]
      [NEW]     +77 typeinfo name for grpc::DefaultHealthCheckService::HealthCheckServiceImpl::WatchCall     +77  [NEW]
      [NEW]     +72 typeinfo name for grpc::DefaultHealthCheckService::HealthCheckServiceImpl::CallHandl     +72  [NEW]
      [NEW]     +64 typeinfo name for grpc::ServerInterface::PayloadAsyncRequest<grpc::ByteBuffer>           +64  [NEW]
      [NEW]     +56 typeinfo for grpc::ServerAsyncWriterInterface<grpc::ByteBuffer>                          +56  [NEW]
      [NEW]     +56 vtable for std::_Sp_counted_ptr_inplace<grpc::DefaultHealthCheckService::HealthCheck     +56  [NEW]
      [NEW]     +56 vtable for std::_Sp_counted_ptr_inplace<grpc::DefaultHealthCheckService::HealthCheck     +56  [NEW]
       +14%     +16 [None]                                                                                     0  [ = ]
  +343% +41.5Ki src/cpp/server/health/default_health_check_service.cc                                +41.5Ki  +343%
     +21e2% +11.0Ki [Other]                                                                              +11.0Ki +21e2%
      [NEW] +8.79Ki grpc::DefaultHealthCheckService::HealthCheckServiceImpl::CheckCallHandler::OnCallRec +8.79Ki  [NEW]
      [NEW] +5.84Ki grpc::DefaultHealthCheckService::HealthCheckServiceImpl::WatchCallHandler::SendHealt +5.84Ki  [NEW]
      [NEW] +3.83Ki grpc::DefaultHealthCheckService::HealthCheckServiceImpl::WatchCallHandler::OnCallRec +3.83Ki  [NEW]
      [NEW] +3.12Ki grpc::DefaultHealthCheckService::HealthCheckServiceImpl::WatchCallHandler::Shutdown  +3.12Ki  [NEW]
      [NEW] +2.76Ki grpc::DefaultHealthCheckService::HealthCheckServiceImpl::WatchCallHandler::CreateAnd +2.76Ki  [NEW]
      [NEW] +2.14Ki grpc::ServerAsyncWriter<grpc::ByteBuffer>::WriteAndFinish                            +2.14Ki  [NEW]
      [NEW] +1.90Ki grpc::ServerAsyncWriter<grpc::ByteBuffer>::Finish                                    +1.90Ki  [NEW]
      [NEW] +1.67Ki grpc::DefaultHealthCheckService::HealthCheckServiceImpl::CheckCallHandler::CreateAnd +1.67Ki  [NEW]
      [NEW] +1.05Ki grpc::ServerAsyncWriter<grpc::ByteBuffer>::Write                                     +1.05Ki  [NEW]
      [NEW] +1.01Ki grpc::ServerAsyncWriter<grpc::ByteBuffer>::Write                                     +1.01Ki  [NEW]
      [NEW]    +901 grpc::DefaultHealthCheckService::RegisterCallHandler                                    +901  [NEW]
      [NEW]    +857 grpc::DefaultHealthCheckService::HealthCheckServiceImpl::WatchCallHandler::WatchCall    +857  [NEW]
      [NEW]    +830 grpc::ServerAsyncWriter<grpc::ByteBuffer>::SendInitialMetadata                          +830  [NEW]
      [NEW]    +830 grpc::ServerAsyncResponseWriter<grpc::ByteBuffer>::SendInitialMetadata                  +830  [NEW]
      [NEW]    +826 grpc::DefaultHealthCheckService::HealthCheckServiceImpl::DecodeRequest                  +826  [NEW]
      [NEW]    +772 grpc::DefaultHealthCheckService::HealthCheckServiceImpl::WatchCallHandler::~WatchCal    +772  [NEW]
      [NEW]    +764 grpc::DefaultHealthCheckService::HealthCheckServiceImpl::WatchCallHandler::~WatchCal    +764  [NEW]
      [NEW]    +724 std::_Rb_tree<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocato    +724  [NEW]
      [NEW]    +702 grpc::DefaultHealthCheckService::UnregisterCallHandler                                  +702  [NEW]
      [NEW]    +682 grpc::ServerInterface::PayloadAsyncRequest<grpc::ByteBuffer>::FinalizeResult            +682  [NEW]
  +0.3%    +127 src/cpp/server/server_cc.cc                                                             +127  +0.3%
       +53% +1.04Ki grpc::Server::Start                                                                  +1.04Ki   +53%
      [NEW]     +12 [ELF Headers]                                                                            +12  [NEW]

   +19% +68.7Ki TOTAL                                                                                 +804Ki   +15%



@grpc-testing
Copy link

[trickle] No significant performance differences

@grpc-testing
Copy link

Objective-C binary sizes
*****************STATIC******************
  New size                      Old size
 1,955,025      Total (=)      1,955,025

 No significant differences in binary sizes

***************FRAMEWORKS****************
  New size                      Old size
10,843,752      Total (<)     10,843,760

 No significant differences in binary sizes


@grpc-testing
Copy link

[microbenchmarks] No significant performance differences

@markdroth
Copy link
Member Author

Known failures: #16482 #16483 #16230 #16484

@markdroth markdroth merged commit 4d985ef into grpc:master Aug 28, 2018
@markdroth markdroth deleted the health_checking_service branch August 28, 2018 18:59
markdroth added a commit to markdroth/grpc that referenced this pull request Aug 29, 2018
@AspirinSJL AspirinSJL added release notes: no Indicates if PR should not be in release notes and removed release notes: yes Indicates if PR needs to be in release notes labels Aug 31, 2018
markdroth added a commit to markdroth/grpc that referenced this pull request Sep 5, 2018
@lock lock bot locked as resolved and limited conversation to collaborators Nov 29, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
release notes: no Indicates if PR should not be in release notes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants