Skip to content
This repository was archived by the owner on Feb 18, 2025. It is now read-only.
This repository was archived by the owner on Feb 18, 2025. It is now read-only.

No way to handle the only semi-sync replica failing #1137

@kklimonda

Description

@kklimonda

(updated topology screenshot to match the question)

I'm testing the following topology:

Screenshot 2020-04-24 at 11 56 27

Single master that has semi-sync replication enabled, with single semi-sync slave running in another DC. The idea here is to gracefully failover to another DC in case master's DC goes offline.

I have a PostFailover hook that makes sure that, in case of master failover, semi-sync replication is enabled on either replica from another DC (preferably) or replica in the same DC as master and disabled on all other replicas.

This seems to be working fine, however I can't figure out how to handle failure of semi-sync replica - there is no hook executed when replica is lost, and so master stops accepting writes as it's waiting for ACK from its remaining replicas (none of which have semi-sync replication enabled).

Is this somehow related to Semi-sync enforcement? I've already raised similar question on the ML, but it's not obvious from documentation and code that this feature is a correct approach here.

One idea I had was to turn that topology into something similar to that:

Screenshot 2020-04-24 at 11 30 42

In this topology semi-sync replica is also intermediate master, which triggers hooks on failure and lets me reconfigure other replica for semi-sync replication.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions