allocation.asciidoc 2.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. [[breaking_50_allocation]]
  2. === Allocation changes
  3. ==== Primary shard allocation
  4. Previously, primary shards were only assigned if a quorum of shard copies were
  5. found (configurable using `index.recovery.initial_shards`, now deprecated). In
  6. case where a primary had only a single replica, quorum was defined to be a
  7. single shard. This meant that any shard copy of an index with replication
  8. factor 1 could become primary, even it was a stale copy of the data on disk.
  9. This is now fixed thanks to shard allocation IDs.
  10. Allocation IDs assign unique identifiers to shard copies. This allows the
  11. cluster to differentiate between multiple copies of the same data and track
  12. which shards have been active so that, after a cluster restart, only shard
  13. copies containing the most recent data can become primaries.
  14. ==== Indices Shard Stores command
  15. By using allocation IDs instead of version numbers to identify shard copies
  16. for primary shard allocation, the former versioning scheme has become
  17. obsolete. This is reflected in the
  18. <<indices-shards-stores,Indices Shard Stores API>>.
  19. A new `allocation_id` field replaces the former `version` field in the result
  20. of the Indices Shard Stores command. This field is available for all shard
  21. copies that have been either created with the current version of Elasticsearch
  22. or have been active in a cluster running a current version of Elasticsearch.
  23. For legacy shard copies that have not been active in a current version of
  24. Elasticsearch, a `legacy_version` field is available instead (equivalent to
  25. the former `version` field).
  26. ==== Reroute commands
  27. The reroute command `allocate` has been split into two distinct commands
  28. `allocate_replica` and `allocate_empty_primary`. This was done as we
  29. introduced a new `allocate_stale_primary` command. The new `allocate_replica`
  30. command corresponds to the old `allocate` command with `allow_primary` set to
  31. false. The new `allocate_empty_primary` command corresponds to the old
  32. `allocate` command with `allow_primary` set to true.
  33. ==== Custom Reroute Commands
  34. Elasticsearch no longer supports plugins registering custom allocation
  35. commands. It was unused and hopefully unneeded.
  36. ==== `index.shared_filesystem.recover_on_any_node` changes
  37. The behavior of `index.shared_filesystem.recover_on_any_node: true` has been
  38. changed. Previously, in the case where no shard copies could be found, an
  39. arbitrary node was chosen by potentially ignoring allocation deciders. Now, we
  40. take balancing into account but don't assign the shard if the allocation
  41. deciders are not satisfied.
  42. The behavior has also changed in the case where shard copies can be found.
  43. Previously, a node not holding the shard copy was chosen if none of the nodes
  44. holding shard copies were satisfying the allocation deciders. Now, the shard
  45. will be assigned to a node having a shard copy, even if none of the nodes
  46. holding a shard copy satisfy the allocation deciders.