tarantool / tarantool/migrations

Ability to execute migration only once on the single node of a cluster

Open
#43 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

feature
Dominant language
Lua
Stars
20
Forks
6
PR merge metrics
No merged PRs in 30d

Description

Now all migrations will execute on each node of the cluster.

I want to insert some initial data to some sharded space in a cluster (constants, configs etc).
For example consider the following migration code:


return {
    up = function()

        crud.insert('dictionary', {1, box.NULL, 'en_ru', 'apple', 'яблоко'})
        crud.insert('dictionary', {2, box.NULL, 'en_ru', 'tomato', 'томат'})

        return true
    end,

    run_on_single_node = true
}

It seems that if such migration completes without errors it must be marked as 'EXECUTED' on all nodes.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

No files, tests, or entry points are named. Start by tracing how migrations execute on cluster nodes and how completed migrations are recorded, then verify the behavior with a multi-node migration that inserts initial sharded data. Done means the migration runs on one node while its completion is recorded consistently on all nodes.

Written by the indexing model from the issue text.

Assessment

Tech stack
lua
Domain
databases, distributed-systems
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.