Github user paul-guo- commented on a diff in the pull request:

    https://github.com/apache/incubator-hawq/pull/1078#discussion_r95293627
  
    --- Diff: src/backend/resourcemanager/communication/rmcomm_RMSEG2RM.c ---
    @@ -107,8 +107,10 @@ int sendIMAlive(int  *errorcode,
        if ( res != FUNC_RETURN_OK )
        {
                rm_pfree(AsyncCommContext, context);
    -           elog(WARNING, "Fail to register asynchronous connection for 
sending "
    -                                     "IMAlive message. %d", res);
    +           elog(LOG, "failed to register asynchronous connection for 
sending "
    +                         "IMAlive message. %d", res);
    +           /* Always switch if fail to register connection here. */
    +           switchIMAliveSendingTarget();
    --- End diff --
    
    How often is switchIMAliveSendingTarget()? I mean if it is called often, we 
should have a parameter or bit mask to save the info that standby exists or not 
to avoid frequent string comparison which is obviously heavier than simple 
logical operations.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

Reply via email to