You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@iotdb.apache.org by "Eric Pai (Jira)" <ji...@apache.org> on 2021/08/16 09:21:00 UTC

[jira] [Assigned] (IOTDB-1568) [Distributed] SendHeartbeat may be blocked by client reconnection

     [ https://issues.apache.org/jira/browse/IOTDB-1568?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Eric Pai reassigned IOTDB-1568:
-------------------------------

    Fix Version/s: master branch
         Assignee: Eric Pai
       Resolution: Fixed

Solved in https://github.com/apache/iotdb/pull/3751

> [Distributed] SendHeartbeat may be blocked by client reconnection
> -----------------------------------------------------------------
>
>                 Key: IOTDB-1568
>                 URL: https://issues.apache.org/jira/browse/IOTDB-1568
>             Project: Apache IoTDB
>          Issue Type: Improvement
>          Components: Cluster
>            Reporter: Eric Pai
>            Assignee: Eric Pai
>            Priority: Major
>              Labels: pull-request-available
>             Fix For: master branch
>
>
> See the implemention HeartbeatThread.sendHeartbeatSync:
> [https://github.com/apache/iotdb/blob/337539557eac8e4d003db7a964984aeab4e3f389/cluster/src/main/java/org/apache/iotdb/cluster/server/heartbeat/HeartbeatThread.java#L205-L242|http://example.com]
> For a given node, the heartbeat sent process contains two steps:
>  # Acquire a client instance from the syncHeartbeatClientPool(SyncClientPool)
>  # Submit the sent request procedure to a thread pool to execute in parallel.
> However, if the node is offline but the status recorded in local is actived, step 1 will be blocked in trying to establish the TCP connection until connection timeout. This will block the following heartbeat broadcast, and some followers will not receive heartbeat in time, thus a new but unnecessary election will start. The whole cluster may be in an unstable status.
> The same issue also exists in requestVoteSync 
> [https://github.com/apache/iotdb/blob/337539557eac8e4d003db7a964984aeab4e3f389/cluster/src/main/java/org/apache/iotdb/cluster/server/heartbeat/HeartbeatThread.java#L402-L425|http://example.com]



--
This message was sent by Atlassian Jira
(v8.3.4#803005)