Skip to content

Rename the allow_primary param of the _reroute API #14352

@bleskes

Description

@bleskes

The allocate command of the _reroute API takes an allow_primary parameter, which allows to force assign a primary shard. Using this parameter is dangerous as it will always result in data loss and the new shard will be created empty. This is well documented, but I still see people use it in an attempt to recover from a scenario where ES does not assign the primary to a node that has shard data on disk. The hope there is that that will trigger an allocation and the data will be salvaged. Sadly this means the data is deleted and any hope of salvaging it in another way (something is wrong with it) is lost.

I suggest we rename the parameter to something that makes the weight of the decision clearer. I can't come up with a concise name though. Some suggestions I had is 'assign_primary_as_empty,force_clean_primary` .

Metadata

Metadata

Assignees

No one assigned

    Labels

    :Distributed/AllocationAll issues relating to the decision making around placing a shard (both master logic & on the nodes)discuss

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions