migrations icon indicating copy to clipboard operation
migrations copied to clipboard

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

Open vrogach2020 opened this issue 4 years ago • 0 comments

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.

vrogach2020 avatar Mar 30 '21 17:03 vrogach2020