allocation.asciidoc 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  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. ==== `index.shared_filesystem.recover_on_any_node` changes
  34. The behavior of `index.shared_filesystem.recover_on_any_node: true` has been
  35. changed. Previously, in the case where no shard copies could be found, an
  36. arbitrary node was chosen by potentially ignoring allocation deciders. Now, we
  37. take balancing into account but don't assign the shard if the allocation
  38. deciders are not satisfied.
  39. The behavior has also changed in the case where shard copies can be found.
  40. Previously, a node not holding the shard copy was chosen if none of the nodes
  41. holding shard copies were satisfying the allocation deciders. Now, the shard
  42. will be assigned to a node having a shard copy, even if none of the nodes
  43. holding a shard copy satisfy the allocation deciders.