drill-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sudheeshkatkam <...@git.apache.org>
Subject [GitHub] drill pull request #726: DRILL-5218: Support disabling hearbeats from C++ cl...
Date Wed, 25 Jan 2017 22:39:00 GMT
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`.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

Mime
View raw message