Skip to content

Non-transitive connectivity can prevent auto-failover from occurring #4357

Open

Description

@timmaxw

RethinkDB 2.1 will occasionally fail to fail over if there is a non-transitive connectivity (i.e. server A can contact server B and server B can contact server C, but server A cannot contact server C).

Here's an example scenario:

  • Consider a table with three shards (let's call them A, B, and C) of three replicas each (designated P, R1, R2), with no sharing, so nine machines total (AP, AR1, AR2, BP, etc.).
  • Suppose that BP is acting as Raft leader for the table as a whole.
  • AP fails, and the connection between AR1 and BP is lost, but all other connections remain valid.
  • Because BP cannot contact a majority of the replicas for shard A, it does not attempt to elect a new primary for shard A.

This is not a very likely scenario; the conditions for it are convoluted, and non-transitive connectivity won't last very long under typical network topologies. Therefore, this is a low priority right now.

The long-term solution is to run a separate Raft instance for each shard in addition to the table-wide Raft instance. This way, AR1 and AR2 would be able to decide to fail over on their own without the help of BP.

Activity

  1. added this to the subsequent milestone on Jun 9, 2015
  2. danielmewes commented on Jun 9, 2015

    @danielmewes
    Member

    Putting into subsequent. Even if we had the time before 2.1, I'd like to avoid changing the architecture so close before the release.

  3. CaptainYarb commented on Oct 3, 2016

    @CaptainYarb

    Is there any update to this issue? We had a complete application outage as a result of this. It took us nearly 2 hours to even find the specific issue as everything appeared online. Only when we checked the stats table and found errors did we understand that a single specific server was the issue. We restarted it's daemon and it immediately resolved the problem. A failover would have been really crucial in this situation.

  4. thomasmodeneis commented on Oct 28, 2016

    @thomasmodeneis

    Right now I'm mitigating this making use of healthchecks and developing someway to auto-restart rethinkdb; but indeed we will all benefit of the resolution of this ticket.

  5. RafaelKr commented on Feb 2, 2017

    @RafaelKr

    Are there any news about progress to this?

  6. srh commented on Feb 3, 2017

    @srh
    Contributor

    My guess is, no progress, but... if I get the chance I'll look into it.

  7. AaronTrazona commented on Aug 9, 2018

    @AaronTrazona

    Any updates?

  8. srh commented on Aug 9, 2018

    @srh
    Contributor

    @AaronTrazona No work has been done on this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions