[ 
https://issues.apache.org/jira/browse/DRILL-5218?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15838736#comment-15838736
 ] 

ASF GitHub Bot commented on DRILL-5218:
---------------------------------------

Github user sudheeshkatkam commented on a diff in the pull request:

    https://github.com/apache/drill/pull/726#discussion_r97896146
  
    --- Diff: contrib/native/client/src/clientlib/drillClientImpl.cpp ---
    @@ -179,9 +179,11 @@ connectionStatus_t DrillClientImpl::sendHeartbeat(){
     }
     
     void DrillClientImpl::resetHeartbeatTimer(){
    -    m_heartbeatTimer.cancel();
    -    DRILL_MT_LOG(DRILL_LOG(LOG_TRACE) << "Reset Heartbeat timer." << 
std::endl;)
    -    startHeartbeatTimer();
    +    if (DrillClientConfig::getHeartbeatFrequency() > 0) {
    +        m_heartbeatTimer.cancel();
    --- End diff --
    
    You are right, cancelling is not required because 
`timer.expires_from_now(...)` cancels the timer as well. So I will remove this 
method and move the check to `startHeartbeatTimer`.


> Support Disabling Heartbeats in C++ Client
> ------------------------------------------
>
>                 Key: DRILL-5218
>                 URL: https://issues.apache.org/jira/browse/DRILL-5218
>             Project: Apache Drill
>          Issue Type: Bug
>          Components: Client - C++
>            Reporter: Sudheesh Katkam
>            Assignee: Sudheesh Katkam
>
> Heartbeats between bits allow for detecting health of remotes, but heartbeats 
> between client and bit may not be necessary? So allow to (at least) disable 
> heartbeats between C++ client and bit.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to