Skip to content

Master-master replication incompatibility. #60

@amdei

Description

@amdei

Consider following case:

Few (let's say 3) nodes in a cluster, with master-master replication.
Each node has it's own queue with name, unique in cluster.
As each tube need to have its own space, these spaces will be created.
But ID of each space may be not unique, as they created on each node separately at virtually the same time.
As a result, there will be errors like

E> ER_TUPLE_FOUND: Duplicate key exists in unique index 'primary' in space '_space'
E> ER_TUPLE_FOUND: Duplicate key exists in unique index 'primary' in space '_index'

in logs.
These errors are fatal for replication. And therefore replication stops.

Following solutions could be proposed:

  1. Change in application: change cluster startup logic, so it'll create all necessary tubes in box.once(). Later each node can pick appropriate queue somehow, and use it.
  2. Change in tarantool-queue: Ensure space ID is globally-unique in cluster. (But how to ensure it?)
  3. Mixed change: tarantool-queue to provide interface to specify ID of a new tube space, so application can assign cluster-unique values for them.

Metadata

Metadata

Assignees

No one assigned

    Labels

    featureA new functionality

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions