Master-master replication incompatibility.
Nobody has claimed this yet.
- Dominant language
- Lua
- Stars
- 244
- Forks
- 56
- PR merge metrics
- No merged PRs in 30d
Description
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:
- 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.
- Change in tarantool-queue: Ensure space ID is globally-unique in cluster. (But how to ensure it?)
- Mixed change: tarantool-queue to provide interface to specify ID of a new tube space, so application can assign cluster-unique values for them.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
No files, tests, or implementation entry points are named. Start by tracing tarantool-queue's tube-space creation and the cluster startup logic around box.once(), then reproduce the duplicate _space and _index errors with master-master replication; done means replication remains running without duplicate-ID failures.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- lua
- Domain
- databases, distributed-systems
- Issue type
- Bug
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100