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` .
The allocate command of the _reroute API takes an
allow_primaryparameter, 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` .