[
https://issues.apache.org/jira/browse/DRILL-5218?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15836747#comment-15836747
]
ASF GitHub Bot commented on DRILL-5218:
---------------------------------------
Github user laurentgo commented on a diff in the pull request:
https://github.com/apache/drill/pull/726#discussion_r97665284
--- 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 --
I was wondering if one needs to cancel the timer, as startHearbeatTimer
sets it again to expire. Maybe all this logic can be done in one place (like
startHeartbeatTimer?)
I also noticed another place where m_heartbeatTime.cancel() is called, in
broadcastError. I guess this is fine (probably not an error of calling cancel()
if not set, but haven't checked asio doc on it), but maybe this should be
cleaned up/guarded too...
> 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)